Module: Shogun::Normalizer
- Defined in:
- lib/shogun/normalizer.rb
Instance Method Summary collapse
Instance Method Details
#as_meta ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/shogun/normalizer.rb', line 13 def .inject({}) do |hash, | if public_send() hash.merge( => public_send()) else hash end end end |
#to_hash ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/shogun/normalizer.rb', line 3 def to_hash attributes.inject({}) do |hash, attribute| if public_send(attribute) hash.merge(attribute => public_send(attribute)) else hash end end end |