Class: ProximityBeacon::Beacon
Instance Method Summary
collapse
#as_json, camelcase_attr_accessor, #initialize, #to_json, #update
Instance Method Details
#advertised_id=(value) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/proximity_beacon/beacon.rb', line 11
def advertised_id=(value)
if value.is_a? Hash
@advertised_id = AdvertisedId.new(value)
else
@advertised_id = value
end
end
|
#id ⇒ Object
19
20
21
|
# File 'lib/proximity_beacon/beacon.rb', line 19
def id
name.split("/")[1]
end
|
#inspect ⇒ Object
31
32
33
|
# File 'lib/proximity_beacon/beacon.rb', line 31
def inspect
"#<Beacon name=\"#{name}\" description=\"#{description}\" advertised_id=#{advertised_id.inspect}>"
end
|
#instance ⇒ Object
27
28
29
|
# File 'lib/proximity_beacon/beacon.rb', line 27
def instance
advertised_id.ids[1]
end
|
#namespace ⇒ Object
23
24
25
|
# File 'lib/proximity_beacon/beacon.rb', line 23
def namespace
advertised_id.ids[0]
end
|