Module: Windcharger::HashTransformer

Defined in:
lib/windcharger/hash_transformer.rb

Instance Method Summary collapse

Instance Method Details

#transformObject Also known as: to_h



5
6
7
8
9
# File 'lib/windcharger/hash_transformer.rb', line 5

def transform
  self.class.attributes.each_with_object({}) do |attribute, hash|
    hash[attribute] = public_send(attribute)
  end.freeze
end