Class: Miam::DSL::Context
- Inherits:
-
Object
- Object
- Miam::DSL::Context
- Defined in:
- lib/miam/dsl/context.rb
Defined Under Namespace
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.
10 11 12 13 14 15 |
# File 'lib/miam/dsl/context.rb', line 10 def initialize(path, = {}, &block) @path = path @options = @result = {:users => {}, :groups => {}, :roles => {}, :instance_profiles => {}} instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/miam/dsl/context.rb', line 8 def result @result end |
Class Method Details
.eval(dsl, path, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'lib/miam/dsl/context.rb', line 2 def self.eval(dsl, path, = {}) self.new(path, ) { eval(dsl, binding, path) } end |