Class: Washbullet::Push

Inherits:
Object
  • Object
show all
Defined in:
lib/washbullet/push.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response_body) ⇒ Push

Returns a new instance of Push.



5
6
7
# File 'lib/washbullet/push.rb', line 5

def initialize(response_body)
  @body = response_body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/washbullet/push.rb', line 3

def body
  @body
end

Instance Method Details

#createdObject



13
14
15
# File 'lib/washbullet/push.rb', line 13

def created
  Time.at(body['created'])
end

#modifiedObject



17
18
19
# File 'lib/washbullet/push.rb', line 17

def modified
  Time.at(body['modified'])
end

#typeObject



9
10
11
# File 'lib/washbullet/push.rb', line 9

def type
  body['type']
end