Module: Pushybullet::Concerns::ToHash
- Included in:
- Types::PushRequest
- Defined in:
- lib/pushybullet/concerns.rb
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/pushybullet/concerns.rb', line 17 def to_hash d = {} instance_variables.each do |name| val = instance_variable_get(name) d[name[1..-1]] = val unless val.nil? end d end |