Module: ApiClient::Mixins::Delegation
- Included in:
- Base, Resource::Base, Scope
- Defined in:
- lib/api_client/mixins/delegation.rb
Instance Method Summary collapse
Instance Method Details
#delegate(*methods) ⇒ Object
| 7 8 9 10 11 12 13 14 15 16 17 | # File 'lib/api_client/mixins/delegation.rb', line 7 def delegate(*methods) hash = methods.pop to = hash[:to] methods.each do |method| class_eval " def \#{method}(*args, &block)\n \#{to}.\#{method}(*args, &block)\n end\n STR\n end\nend\n" |