Class: Washbullet::Entity

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

Direct Known Subclasses

Contact, Device, User

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

Instance Method Details

#createdObject



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

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

#modifiedObject



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

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