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