Class: Washbullet::Push
- Inherits:
-
Object
- Object
- Washbullet::Push
- Defined in:
- lib/washbullet/push.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
- #created ⇒ Object
-
#initialize(response_body) ⇒ Push
constructor
A new instance of Push.
- #modified ⇒ Object
- #type ⇒ Object
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/washbullet/push.rb', line 3 def body @body end |
Instance Method Details
#created ⇒ Object
13 14 15 |
# File 'lib/washbullet/push.rb', line 13 def created Time.at(body['created']) end |
#modified ⇒ Object
17 18 19 |
# File 'lib/washbullet/push.rb', line 17 def modified Time.at(body['modified']) end |
#type ⇒ Object
9 10 11 |
# File 'lib/washbullet/push.rb', line 9 def type body['type'] end |