Class: Walkon::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/walkon/device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_musicObject (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_addressObject (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

Returns:

  • (Boolean)


14
15
16
# File 'lib/walkon/device.rb', line 14

def has_entrance_music?
  entrance_music.exists?
end