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