Class: Roadworker::DSL

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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

#resultObject (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

.test(dsl, options) ⇒ Object



22
23
24
# File 'lib/roadworker/dsl.rb', line 22

def test(dsl, options)
  Tester.test(dsl, options)
end