Module: Odsl::Methods
- Included in:
- Dsl
- Defined in:
- lib/odsl/methods.rb
Instance Method Summary collapse
Instance Method Details
#call(methodo) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/odsl/methods.rb', line 10 def call(methodo) run_method(methodo) restore_delegate self end |
#to(*variables) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/odsl/methods.rb', line 18 def to(*variables) variables.each_with_index do |variable, index| instance_variable_set("@#{variable}", @last_results[index]) end self end |
#use(object) ⇒ Object
4 5 6 7 8 |
# File 'lib/odsl/methods.rb', line 4 def use(object) @delegated = instance_variable_get("@#{object}") self end |