Module: Windcharger::HashTransformer

Defined in:
lib/windcharger/hash_transformer.rb

Instance Method Summary collapse

Instance Method Details

#transformObject 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