Remove Env#current_recipe attribute
This commit is contained in:
@@ -21,7 +21,7 @@ module Producer
|
||||
end
|
||||
|
||||
def env
|
||||
@env ||= Env.new(recipe)
|
||||
@env ||= Env.new
|
||||
end
|
||||
|
||||
def recipe
|
||||
|
@@ -1,14 +1,12 @@
|
||||
module Producer
|
||||
module Core
|
||||
class Env
|
||||
attr_reader :current_recipe
|
||||
attr_writer :output
|
||||
attr_accessor :target
|
||||
|
||||
def initialize(recipe = nil)
|
||||
@current_recipe = recipe
|
||||
@output = $stdout
|
||||
@target = nil
|
||||
def initialize
|
||||
@output = $stdout
|
||||
@target = nil
|
||||
end
|
||||
|
||||
def output(str)
|
||||
|
@@ -13,7 +13,7 @@ module Producer
|
||||
def evaluate(env)
|
||||
@env = env
|
||||
if @code
|
||||
instance_eval @code, env.current_recipe.filepath
|
||||
instance_eval @code
|
||||
else
|
||||
instance_eval &@block
|
||||
end
|
||||
|
Reference in New Issue
Block a user