Module: KakaoPush::ToHashable
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/kakao_push/to_hashable.rb', line 3 def to_hash Hash[ instance_variables.map { |var_name| [var_name.to_s.gsub('@',''), instance_variable_get(var_name)] }.select {|el| !el.last.nil? } ] end |