Class: MachineHead::Status
- Inherits:
-
Object
- Object
- MachineHead::Status
- Defined in:
- lib/machine_head/status.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#lock ⇒ Object
readonly
Returns the value of attribute lock.
-
#net_packetrate ⇒ Object
readonly
Returns the value of attribute net_packetrate.
-
#raw_bitrate ⇒ Object
readonly
Returns the value of attribute raw_bitrate.
-
#signal_quality ⇒ Object
readonly
Returns the value of attribute signal_quality.
-
#signal_strength ⇒ Object
readonly
Returns the value of attribute signal_strength.
-
#symbol_quality ⇒ Object
readonly
Returns the value of attribute symbol_quality.
Instance Method Summary collapse
-
#initialize(status_text) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(status_text) ⇒ Status
Returns a new instance of Status.
6 7 8 9 10 |
# File 'lib/machine_head/status.rb', line 6 def initialize(status_text) @channel, @lock, @signal_strength, @signal_quality, @symbol_quality, @raw_bitrate, @net_packetrate = status_text.split.map{|i| i.split('=').last} end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def channel @channel end |
#lock ⇒ Object (readonly)
Returns the value of attribute lock.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def lock @lock end |
#net_packetrate ⇒ Object (readonly)
Returns the value of attribute net_packetrate.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def net_packetrate @net_packetrate end |
#raw_bitrate ⇒ Object (readonly)
Returns the value of attribute raw_bitrate.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def raw_bitrate @raw_bitrate end |
#signal_quality ⇒ Object (readonly)
Returns the value of attribute signal_quality.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def signal_quality @signal_quality end |
#signal_strength ⇒ Object (readonly)
Returns the value of attribute signal_strength.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def signal_strength @signal_strength end |
#symbol_quality ⇒ Object (readonly)
Returns the value of attribute symbol_quality.
3 4 5 |
# File 'lib/machine_head/status.rb', line 3 def symbol_quality @symbol_quality end |