Class: Piculet::DSL
- Inherits:
-
Object
- Object
- Piculet::DSL
- Defined in:
- lib/piculet/dsl.rb,
lib/piculet/dsl/ec2.rb,
lib/piculet/dsl/converter.rb,
lib/piculet/dsl/permission.rb,
lib/piculet/dsl/permissions.rb,
lib/piculet/dsl/security-group.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
of class methods.
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.
21 22 23 24 25 |
# File 'lib/piculet/dsl.rb', line 21 def initialize(path, &block) @path = path @result = OpenStruct.new(:ec2s => {}) instance_eval(&block) end |
Instance Attribute Details
#result ⇒ Object (readonly)
of class methods
19 20 21 |
# File 'lib/piculet/dsl.rb', line 19 def result @result end |
Class Method Details
.convert(exported, owner_id) ⇒ Object
14 15 16 |
# File 'lib/piculet/dsl.rb', line 14 def convert(exported, owner_id) Converter.convert(exported, owner_id) end |
.define(source, path) ⇒ Object
8 9 10 11 12 |
# File 'lib/piculet/dsl.rb', line 8 def define(source, path) self.new(path) do eval(source, binding) end end |