Class: Tgios::FakeBeacon
- Inherits:
-
Object
- Object
- Tgios::FakeBeacon
- Defined in:
- lib/tgios/beacon_manager.rb
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
Returns the value of attribute accuracy.
-
#major ⇒ Object
Returns the value of attribute major.
-
#minor ⇒ Object
Returns the value of attribute minor.
-
#proximity ⇒ Object
Returns the value of attribute proximity.
-
#proximityUUID ⇒ Object
Returns the value of attribute proximityUUID.
-
#rssi ⇒ Object
Returns the value of attribute rssi.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ FakeBeacon
constructor
A new instance of FakeBeacon.
Constructor Details
#initialize(attributes) ⇒ FakeBeacon
Returns a new instance of FakeBeacon.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tgios/beacon_manager.rb', line 10 def initialize(attributes) attributes.each do |k, v| k = :proximityUUID if k.to_s == 'uuid' instance_variable_set("@#{k}", v) end @proximityUUID ||= NSUUID.new @major ||= 34702 @minor ||= 31202 @accuracy ||= 3.0 @rssi ||= -85 @proximity ||= CLProximityFar end |
Instance Attribute Details
#accuracy ⇒ Object
Returns the value of attribute accuracy.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def accuracy @accuracy end |
#major ⇒ Object
Returns the value of attribute major.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def major @major end |
#minor ⇒ Object
Returns the value of attribute minor.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def minor @minor end |
#proximity ⇒ Object
Returns the value of attribute proximity.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def proximity @proximity end |
#proximityUUID ⇒ Object
Returns the value of attribute proximityUUID.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def proximityUUID @proximityUUID end |
#rssi ⇒ Object
Returns the value of attribute rssi.
8 9 10 |
# File 'lib/tgios/beacon_manager.rb', line 8 def rssi @rssi end |