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
Defined Under Namespace
Classes: Map
Instance Attribute Summary collapse
-
#ancestor_ids ⇒ Array<Integer>
The ID of the locations that containt the location, including the location itself.
-
#capacity ⇒ Integer
The capacity (maximum number of people) of the location.
-
#capacity_tree ⇒ Integer
The capacity (maximum number of people) of the location including descendant locations.
-
#capacity_used ⇒ Integer
The used capacity (present number of people) of the location.
-
#capacity_used_percentage ⇒ Float
The used capacity percentage of the location.
-
#capacity_used_percentage_tree ⇒ Float
The used capacity percentage of the location including descendant locations.
-
#capacity_used_tree ⇒ Integer
The used capacity (present number of people) of the location including descendant locations.
-
#checkout_location ⇒ Location?
The location to move people to when they are checked out.
-
#checkout_location_id ⇒ Integer?
The ID of the location to move people to when they are checked out.
-
#company ⇒ LWS::Auth::Company
The company the location belongs to.
-
#company_id ⇒ Integer
The ID of the company the location belongs to.
-
#descendant_ids ⇒ Array<Integer>
The IDs of the underlying locations 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_positions ⇒ Array<Location::Map::Position>
The location map positions that track this location.
-
#maps ⇒ Array<Location::Map>
The maps for this location.
-
#name ⇒ String
The name of the location.
-
#parent ⇒ Location
The parent of the location.
-
#parent_id ⇒ Integer
The ID of the parent of the location.
-
#people ⇒ Array<Person>
The people associated with the location.
-
#people_tree ⇒ Array<Person>
The people associated with the location including descendant locations.
-
#range ⇒ Integer
The range around the location in meters.
-
#readers ⇒ Array<Reader>
The (RFID/code/ID/…) readers linked to this location.
Attributes inherited from Generic::Model
#created_at, #id, #updated_at, #url, #url_html
Method Summary
Methods inherited from Generic::Model
Instance Attribute Details
#ancestor_ids ⇒ Array<Integer>
Returns the ID of the locations that containt the location, including the location itself.
45 |
# File 'lib/lws/apps/presence.rb', line 45 attribute :ancestor_ids |
#capacity ⇒ Integer
Returns the capacity (maximum number of people) of the location.
49 |
# File 'lib/lws/apps/presence.rb', line 49 attribute :capacity |
#capacity_tree ⇒ Integer
Returns the capacity (maximum number of people) of the location including descendant locations.
54 |
# File 'lib/lws/apps/presence.rb', line 54 attribute :capacity_tree |
#capacity_used ⇒ Integer
Returns the used capacity (present number of people) of the location.
58 |
# File 'lib/lws/apps/presence.rb', line 58 attribute :capacity_used |
#capacity_used_percentage ⇒ Float
Returns the used capacity percentage of the location.
67 |
# File 'lib/lws/apps/presence.rb', line 67 attribute :capacity_used_precentage |
#capacity_used_percentage_tree ⇒ Float
Returns the used capacity percentage of the location including descendant locations.
72 |
# File 'lib/lws/apps/presence.rb', line 72 attribute :capacity_used_precentage_tree |
#capacity_used_tree ⇒ Integer
Returns the used capacity (present number of people) of the location including descendant locations.
63 |
# File 'lib/lws/apps/presence.rb', line 63 attribute :capacity_used_tree |
#checkout_location ⇒ Location?
Returns the location to move people to when they are checked out.
77 78 79 |
# File 'lib/lws/apps/presence.rb', line 77 belongs_to :checkout_location, class_name: "LWS::Presence::Location", foreign_key: "checkout_location_id", uri: "locations/:id" |
#checkout_location_id ⇒ Integer?
Returns the ID of the location to move people to when they are checked out.
84 |
# File 'lib/lws/apps/presence.rb', line 84 attribute :checkout_location_id |
#company ⇒ LWS::Auth::Company
Returns the company the location belongs to.
88 |
# File 'lib/lws/apps/presence.rb', line 88 belongs_to :company, class_name: "LWS::Auth::Company" |
#company_id ⇒ Integer
Returns the ID of the company the location belongs to.
92 |
# File 'lib/lws/apps/presence.rb', line 92 attribute :company_id |
#descendant_ids ⇒ Array<Integer>
Returns the IDs of the underlying locations of the location.
96 |
# File 'lib/lws/apps/presence.rb', line 96 attribute :descendant_ids |
#lat ⇒ Float
Returns the latitude of the location.
100 |
# File 'lib/lws/apps/presence.rb', line 100 attribute :lat |
#logoff_time ⇒ String
Returns the time everybody is automatically logged off (format HH:MM).
105 |
# File 'lib/lws/apps/presence.rb', line 105 attribute :logoff_time |
#long ⇒ Float
Returns the longitude of the location.
109 |
# File 'lib/lws/apps/presence.rb', line 109 attribute :long |
#map_positions ⇒ Array<Location::Map::Position>
Returns the location map positions that track this location.
114 |
# File 'lib/lws/apps/presence.rb', line 114 has_many :map_positions, class_name: "LWS::Presence::Location::Map::Position" |
#maps ⇒ Array<Location::Map>
Returns the maps for this location.
118 |
# File 'lib/lws/apps/presence.rb', line 118 has_many :maps, class_name: "LWS::Presence::Location::Map" |
#name ⇒ String
Returns the name of the location.
122 |
# File 'lib/lws/apps/presence.rb', line 122 attribute :name |
#parent ⇒ Location
Returns the parent of the location.
126 127 128 |
# File 'lib/lws/apps/presence.rb', line 126 belongs_to :parent, class_name: "LWS::Presence::Location", foreign_key: "parent_id", uri: "locations/:id" |
#parent_id ⇒ Integer
Returns the ID of the parent of the location.
132 |
# File 'lib/lws/apps/presence.rb', line 132 attribute :parent_id |
#people ⇒ Array<Person>
Returns the people associated with the location.
136 |
# File 'lib/lws/apps/presence.rb', line 136 has_many :people |
#people_tree ⇒ Array<Person>
Returns the people associated with the location including descendant locations.
141 |
# File 'lib/lws/apps/presence.rb', line 141 has_many :people_tree, class_name: "LWS::Presence::Person" |
#range ⇒ Integer
Returns the range around the location in meters.
145 |
# File 'lib/lws/apps/presence.rb', line 145 attribute :range |
#readers ⇒ Array<Reader>
Returns the (RFID/code/ID/…) readers linked to this location.
149 |
# File 'lib/lws/apps/presence.rb', line 149 has_many :readers |