Class: EEML::Location
- Inherits:
-
Object
- Object
- EEML::Location
- Defined in:
- lib/eeml/location.rb
Overview
An class representing a location. Can be added to EEML::Data objects.
Instance Attribute Summary collapse
-
#disposition ⇒ Object
Disposition (:fixed or :mobile).
-
#domain ⇒ Object
Domain (:physical or :virtual).
-
#ele ⇒ Object
Elevation of location.
-
#exposure ⇒ Object
Exposure (:indoor or :outdoor).
-
#lat ⇒ Object
Latitude of location.
-
#lon ⇒ Object
Longitude of location.
-
#name ⇒ Object
The name of the location.
Instance Method Summary collapse
-
#initialize(loc_domain, options = {}) ⇒ Location
constructor
Create a new EEML::Location item.
Constructor Details
#initialize(loc_domain, options = {}) ⇒ Location
Create a new EEML::Location item. Domain setting is required, and must be either :physical or :virtual.
7 8 9 10 11 12 13 14 15 |
# File 'lib/eeml/location.rb', line 7 def initialize(loc_domain, = {}) set_domain(loc_domain) set_exposure([:exposure]) set_disposition([:disposition]) @name = [:name] self.lat = [:lat] self.lon = [:lon] @ele = [:ele] end |
Instance Attribute Details
#disposition ⇒ Object
Disposition (:fixed or :mobile)
34 35 36 |
# File 'lib/eeml/location.rb', line 34 def disposition @disposition end |
#domain ⇒ Object
Domain (:physical or :virtual)
18 19 20 |
# File 'lib/eeml/location.rb', line 18 def domain @domain end |
#ele ⇒ Object
Elevation of location
67 68 69 |
# File 'lib/eeml/location.rb', line 67 def ele @ele end |
#exposure ⇒ Object
Exposure (:indoor or :outdoor)
26 27 28 |
# File 'lib/eeml/location.rb', line 26 def exposure @exposure end |
#lat ⇒ Object
Latitude of location
45 46 47 |
# File 'lib/eeml/location.rb', line 45 def lat @lat end |
#lon ⇒ Object
Longitude of location
56 57 58 |
# File 'lib/eeml/location.rb', line 56 def lon @lon end |
#name ⇒ Object
The name of the location
42 43 44 |
# File 'lib/eeml/location.rb', line 42 def name @name end |