Class: EEML::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/eeml/location.rb

Overview

An class representing a location. Can be added to EEML::Data objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  set_domain(loc_domain)
  set_exposure(options[:exposure])
  set_disposition(options[:disposition])
  @name = options[:name]
  self.lat = options[:lat]
  self.lon = options[:lon]
  @ele = options[:ele]
end

Instance Attribute Details

#dispositionObject

Disposition (:fixed or :mobile)



34
35
36
# File 'lib/eeml/location.rb', line 34

def disposition
  @disposition
end

#domainObject

Domain (:physical or :virtual)



18
19
20
# File 'lib/eeml/location.rb', line 18

def domain
  @domain
end

#eleObject

Elevation of location



67
68
69
# File 'lib/eeml/location.rb', line 67

def ele
  @ele
end

#exposureObject

Exposure (:indoor or :outdoor)



26
27
28
# File 'lib/eeml/location.rb', line 26

def exposure
  @exposure
end

#latObject

Latitude of location



45
46
47
# File 'lib/eeml/location.rb', line 45

def lat
  @lat
end

#lonObject

Longitude of location



56
57
58
# File 'lib/eeml/location.rb', line 56

def lon
  @lon
end

#nameObject

The name of the location



42
43
44
# File 'lib/eeml/location.rb', line 42

def name
  @name
end