Class: WifiWand::SignalQuality
- Inherits:
-
Struct
- Object
- Struct
- WifiWand::SignalQuality
- Defined in:
- lib/wifi_wand/signal_quality.rb
Instance Attribute Summary collapse
-
#unit ⇒ Object
Returns the value of attribute unit.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#unit ⇒ Object
Returns the value of attribute unit
4 5 6 |
# File 'lib/wifi_wand/signal_quality.rb', line 4 def unit @unit end |
#value ⇒ Object
Returns the value of attribute value
4 5 6 |
# File 'lib/wifi_wand/signal_quality.rb', line 4 def value @value end |
Instance Method Details
#to_s ⇒ Object
5 6 7 |
# File 'lib/wifi_wand/signal_quality.rb', line 5 def to_s unit == :dbm ? "#{value} #{unit_label}" : "#{value}#{unit_label}" end |
#unit_label ⇒ Object
9 10 11 |
# File 'lib/wifi_wand/signal_quality.rb', line 9 def unit_label unit == :dbm ? 'dBm' : '%' end |