Class: Walkon::Device
- Inherits:
-
Object
- Object
- Walkon::Device
- Defined in:
- lib/walkon/device.rb
Instance Attribute Summary collapse
-
#entrance_music ⇒ Object
readonly
Returns the value of attribute entrance_music.
-
#mac_address ⇒ Object
readonly
Returns the value of attribute mac_address.
Instance Method Summary collapse
- #has_entrance_music? ⇒ Boolean
-
#initialize(with_mac_address) ⇒ Device
constructor
A new instance of Device.
Constructor Details
#initialize(with_mac_address) ⇒ Device
Returns a new instance of Device.
9 10 11 12 |
# File 'lib/walkon/device.rb', line 9 def initialize with_mac_address @mac_address = with_mac_address @entrance_music = EntranceMusic.new self end |
Instance Attribute Details
#entrance_music ⇒ Object (readonly)
Returns the value of attribute entrance_music.
7 8 9 |
# File 'lib/walkon/device.rb', line 7 def entrance_music @entrance_music end |
#mac_address ⇒ Object (readonly)
Returns the value of attribute mac_address.
7 8 9 |
# File 'lib/walkon/device.rb', line 7 def mac_address @mac_address end |
Instance Method Details
#has_entrance_music? ⇒ Boolean
14 15 16 |
# File 'lib/walkon/device.rb', line 14 def has_entrance_music? entrance_music.exists? end |