Class: Coyote::DSL
- Inherits:
-
Object
- Object
- Coyote::DSL
- Defined in:
- lib/coyote/dsl.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#options ⇒ Object
Returns the value of attribute options.
-
#output ⇒ Object
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize {|config| ... } ⇒ DSL
constructor
A new instance of DSL.
- #run ⇒ Object
Constructor Details
#initialize {|config| ... } ⇒ DSL
Returns a new instance of DSL.
7 8 9 10 11 12 13 14 15 |
# File 'lib/coyote/dsl.rb', line 7 def initialize(&block) config = Struct.new(:input, :output, :options).new config. = {} yield config if block_given? instance_eval(&block) @input = config.input @output = config.output @options = config. end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
5 6 7 |
# File 'lib/coyote/dsl.rb', line 5 def input @input end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/coyote/dsl.rb', line 5 def @options end |
#output ⇒ Object
Returns the value of attribute output.
5 6 7 |
# File 'lib/coyote/dsl.rb', line 5 def output @output end |