Class: ICWS::Status::UserStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/icws/status/userstatus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(property_map) ⇒ UserStatus

Returns a new instance of UserStatus.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/icws/status/userstatus.rb', line 16

def initialize(property_map)
  @status_id = property_map['statusId']
  @user_id = property_map['userId']
  @notes = property_map['notes']
  @ic_servers = property_map['icServers']
  @stations = property_map['stations']
  @logged_in = property_map['loggedIn']
  @on_phone = property_map['onPhone']
  @status_changed = property_map['statusChanged'] #DateTime.parse property_map['statusChanged']
  @system_id   = property_map['onPhoneChanged']#DateTime.parse property_map['onPhoneChanged']
end

Instance Attribute Details

#ic_serversObject (readonly)

Returns the value of attribute ic_servers.



10
11
12
# File 'lib/icws/status/userstatus.rb', line 10

def ic_servers
  @ic_servers
end

#logged_inObject (readonly)

Returns the value of attribute logged_in.



12
13
14
# File 'lib/icws/status/userstatus.rb', line 12

def logged_in
  @logged_in
end

#notesObject (readonly)

Returns the value of attribute notes.



9
10
11
# File 'lib/icws/status/userstatus.rb', line 9

def notes
  @notes
end

#on_phoneObject (readonly)

Returns the value of attribute on_phone.



13
14
15
# File 'lib/icws/status/userstatus.rb', line 13

def on_phone
  @on_phone
end

#on_phone_changedObject (readonly)

Returns the value of attribute on_phone_changed.



14
15
16
# File 'lib/icws/status/userstatus.rb', line 14

def on_phone_changed
  @on_phone_changed
end

#stationsObject (readonly)

Returns the value of attribute stations.



11
12
13
# File 'lib/icws/status/userstatus.rb', line 11

def stations
  @stations
end

#status_changedObject (readonly)

“=>”20130808T211625Z“,



8
9
10
# File 'lib/icws/status/userstatus.rb', line 8

def status_changed
  @status_changed
end

#status_idObject (readonly)

Returns the value of attribute status_id.



7
8
9
# File 'lib/icws/status/userstatus.rb', line 7

def status_id
  @status_id
end

#user_idObject (readonly)

Returns the value of attribute user_id.



6
7
8
# File 'lib/icws/status/userstatus.rb', line 6

def user_id
  @user_id
end

Instance Method Details

#to_sObject



28
29
30
# File 'lib/icws/status/userstatus.rb', line 28

def to_s
  @user_id + ' - ' + @status_id 
end