Class: LWS::Presence::Location
- Inherits:
-
Generic::Model
- Object
- Spyke::Base
- Generic::Model
- LWS::Presence::Location
- Defined in:
- lib/lws/apps/presence.rb
Overview
The location class
Instance Attribute Summary collapse
-
#capacity ⇒ Fixnum
The capacity (maximum number of people) of the location (including descendant locations).
-
#capacity_used ⇒ Fixnum
The used capacity (present number of people) of the location (including descendant locations).
-
#capacity_used_percentage ⇒ Float
The used capacity percentage of the location (including descendant locations).
-
#company ⇒ LWS::Auth::Company
The company the location belongs to.
-
#company_id ⇒ Fixnum
The ID of the company the location belongs to.
-
#created_at ⇒ String
readonly
The timestamp of when the location was created.
-
#id ⇒ Fixnum
readonly
The (unique) ID of the location.
-
#lat ⇒ Float
The latitude of the location.
-
#logoff_time ⇒ String
The time everybody is automatically logged off (format HH:MM).
-
#long ⇒ Float
The longitude of the location.
-
#map_location_id ⇒ Fixnum
The ID of the map location associated with the location.
-
#name ⇒ String
The name of the location.
-
#parent ⇒ Location
The parent of the location.
-
#parent_id ⇒ Fixnum
The ID of the parent of the location.
-
#people ⇒ Array<Person>
The people associated with the location.
-
#range ⇒ Integer
The range around the location in meters.
-
#readers ⇒ Array<Reader>
The (RFID/code/ID/…) readers linked to this location.
-
#updated_at ⇒ String
readonly
The timestamp of when the location was last updated.
Instance Attribute Details
#capacity ⇒ Fixnum
Returns the capacity (maximum number of people) of the location (including descendant locations).
49 |
# File 'lib/lws/apps/presence.rb', line 49 attribute :capacity |
#capacity_used ⇒ Fixnum
Returns the used capacity (present number of people) of the location (including descendant locations).
54 |
# File 'lib/lws/apps/presence.rb', line 54 attribute :capacity_used |
#capacity_used_percentage ⇒ Float
Returns the used capacity percentage of the location (including descendant locations).
59 |
# File 'lib/lws/apps/presence.rb', line 59 attribute :capacity_used_precentage |
#company ⇒ LWS::Auth::Company
Returns the company the location belongs to.
63 |
# File 'lib/lws/apps/presence.rb', line 63 belongs_to :company, class_name: "LWS::Auth::Company" |
#company_id ⇒ Fixnum
Returns the ID of the company the location belongs to.
67 |
# File 'lib/lws/apps/presence.rb', line 67 attribute :company_id |
#created_at ⇒ String (readonly)
Returns the timestamp of when the location was created.
114 |
# File 'lib/lws/apps/presence.rb', line 114 attribute :created_at |
#id ⇒ Fixnum (readonly)
Returns the (unique) ID of the location.
44 |
# File 'lib/lws/apps/presence.rb', line 44 attribute :id |
#lat ⇒ Float
Returns the latitude of the location.
71 |
# File 'lib/lws/apps/presence.rb', line 71 attribute :lat |
#logoff_time ⇒ String
Returns the time everybody is automatically logged off (format HH:MM).
76 |
# File 'lib/lws/apps/presence.rb', line 76 attribute :logoff_time |
#long ⇒ Float
Returns the longitude of the location.
80 |
# File 'lib/lws/apps/presence.rb', line 80 attribute :long |
#map_location_id ⇒ Fixnum
There is not a relation for this at the moment!
Returns the ID of the map location associated with the location.
86 |
# File 'lib/lws/apps/presence.rb', line 86 attribute :map_location_id |
#name ⇒ String
Returns the name of the location.
90 |
# File 'lib/lws/apps/presence.rb', line 90 attribute :name |
#parent ⇒ Location
Returns the parent of the location.
94 |
# File 'lib/lws/apps/presence.rb', line 94 belongs_to :parent, class_name: "LWS::Presence::Location" |
#parent_id ⇒ Fixnum
Returns the ID of the parent of the location.
98 |
# File 'lib/lws/apps/presence.rb', line 98 attribute :parent_id |
#people ⇒ Array<Person>
Returns the people associated with the location.
102 |
# File 'lib/lws/apps/presence.rb', line 102 has_many :people |
#range ⇒ Integer
Returns the range around the location in meters.
106 |
# File 'lib/lws/apps/presence.rb', line 106 attribute :range |
#readers ⇒ Array<Reader>
Returns the (RFID/code/ID/…) readers linked to this location.
110 |
# File 'lib/lws/apps/presence.rb', line 110 has_many :readers |
#updated_at ⇒ String (readonly)
Returns the timestamp of when the location was last updated.
118 |
# File 'lib/lws/apps/presence.rb', line 118 attribute :updated_at |