Module: Joule::Hashable
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
3 4 5 6 7 |
# File 'lib/joule/hashable.rb', line 3 def to_hash hash = Hash.new instance_variables.each { |v| hash[ v[1..-1].to_sym ] = instance_variable_get v } hash end |