Class: Roadworker::DSL
- Inherits:
-
Object
- Object
- Roadworker::DSL
- Defined in:
- lib/roadworker/dsl.rb,
lib/roadworker/dsl-converter.rb,
lib/roadworker/dsl-tester.rb
Defined Under Namespace
Classes: Converter, HostedZone, Tester
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
of class method.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path, &block) ⇒ DSL
constructor
A new instance of DSL.
Constructor Details
#initialize(path, &block) ⇒ DSL
Returns a new instance of DSL.
29 30 31 32 33 |
# File 'lib/roadworker/dsl.rb', line 29 def initialize(path, &block) @path = path @result = OpenStruct.new({:hosted_zones => []}) instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
of class method
27 28 29 |
# File 'lib/roadworker/dsl.rb', line 27 def result @result end |
Class Method Details
.convert(hosted_zones) ⇒ Object
18 19 20 |
# File 'lib/roadworker/dsl.rb', line 18 def convert(hosted_zones) Converter.convert(hosted_zones) end |
.define(source, path) ⇒ Object
12 13 14 15 16 |
# File 'lib/roadworker/dsl.rb', line 12 def define(source, path) self.new(path) do eval(source, binding) end end |