Module: KakaoPush::ToHashable

Included in:
Apns, Gcm
Defined in:
lib/kakao_push/to_hashable.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



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