Module: Windcharger::HashTransformer
- Defined in:
- lib/windcharger/hash_transformer.rb
Instance Method Summary collapse
- #transform ⇒ Object (also: #to_h)
Instance Method Details
#transform ⇒ Object Also known as: to_h
3 4 5 6 7 |
# File 'lib/windcharger/hash_transformer.rb', line 3 def transform self.class.attributes.each_with_object({}) do |attribute, hash| hash[attribute] = send attribute end end |