Class: Acmaker::DSL::Context
- Inherits:
-
Object
- Object
- Acmaker::DSL::Context
- Defined in:
- lib/acmaker/dsl/context.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, options = {}, &block) ⇒ Context
constructor
A new instance of Context.
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, = {}, &block) @path = path @options = @result = {} instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (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, = {}) new(path, ) do eval(dsl, binding, path) end end |