Method: Invoiced::Object#to_hash
- Defined in:
- lib/invoiced/object.rb
#to_hash ⇒ Object
103 104 105 106 107 108 |
# File 'lib/invoiced/object.rb', line 103 def to_hash @values.inject({}) do |acc, (key, value)| acc[key] = value.respond_to?(:to_hash) ? value.to_hash : value acc end end |