Class: Pendulum::DSL::Result
- Inherits:
-
Object
- Object
- Pendulum::DSL::Result
- Defined in:
- lib/pendulum/dsl/result.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
Returns the value of attribute output.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, &block) ⇒ Result
constructor
A new instance of Result.
- #to_url ⇒ Object
Constructor Details
#initialize(type, &block) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 |
# File 'lib/pendulum/dsl/result.rb', line 5 def initialize(type, &block) self.type = type self.output = output_by(type) self.output.instance_eval(&block) if block_given? end |
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
3 4 5 |
# File 'lib/pendulum/dsl/result.rb', line 3 def output @output end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/pendulum/dsl/result.rb', line 3 def type @type end |
Instance Method Details
#to_url ⇒ Object
11 12 13 |
# File 'lib/pendulum/dsl/result.rb', line 11 def to_url output.to_url end |