Method: Formotion::Base#to_hash

Defined in:
lib/formotion/base.rb

#to_hashObject



13
14
15
16
17
18
19
20
# File 'lib/formotion/base.rb', line 13

def to_hash
  h = {}
   self.class.const_get(:PROPERTIES).each { |prop|
    val = self.send(prop)
    h[prop] = val if val
  }
  h
end