Class: OpenStruct
- Inherits:
-
Object
- Object
- OpenStruct
- Defined in:
- lib/lab42/options/forwarder.rb
Instance Method Summary collapse
-
#forwarding_to(key) ⇒ Object
Given the value of ‘key` can be converted to a Hash Then will return a new `OpenStruct` augmented by this hash.
Instance Method Details
#forwarding_to(key) ⇒ Object
Given the value of ‘key` can be converted to a Hash Then will return a new `OpenStruct` augmented by this hash
5 6 7 8 9 10 11 |
# File 'lib/lab42/options/forwarder.rb', line 5 def forwarding_to key h = to_h k = self[key].to_h # require 'pry' # binding.pry self.class.new k.merge( h ) end |