Class: Acmaker::DSL::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/acmaker/dsl/context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, options = {}, &block) ⇒ Context

Returns a new instance of Context.



12
13
14
15
16
17
# File 'lib/acmaker/dsl/context.rb', line 12

def initialize(path, options = {}, &block)
  @path = path
  @options = options
  @result = {}
  instance_eval(&block)
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



10
11
12
# File 'lib/acmaker/dsl/context.rb', line 10

def result
  @result
end

Class Method Details

.eval(dsl, path, options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/acmaker/dsl/context.rb', line 4

def self.eval(dsl, path, options = {})
  new(path, options) do
    eval(dsl, binding, path)
  end
end