Class: Dyna::DSL
- Inherits:
-
Object
- Object
- Dyna::DSL
- Includes:
- TemplateHelper
- Defined in:
- lib/dyna/dsl.rb,
lib/dyna/dsl/table.rb,
lib/dyna/dsl/converter.rb,
lib/dyna/dsl/dynamo_db.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, &block) ⇒ DSL
constructor
A new instance of DSL.
Methods included from TemplateHelper
Constructor Details
#initialize(path, &block) ⇒ DSL
Returns a new instance of DSL.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dyna/dsl.rb', line 19 def initialize(path, &block) @path = path @result = OpenStruct.new(:ddbs => {}) @context = Hashie::Mash.new( :path => path, :templates => {}, ) instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
17 18 19 |
# File 'lib/dyna/dsl.rb', line 17 def result @result end |
Class Method Details
.convert(region, exported) ⇒ Object
12 13 14 |
# File 'lib/dyna/dsl.rb', line 12 def convert(region, exported) Converter.convert(region, exported) end |
.define(source, path) ⇒ Object
6 7 8 9 10 |
# File 'lib/dyna/dsl.rb', line 6 def define(source, path) self.new(path) do eval(source, binding, path) end end |