Class: Subduino::Parse::Bool
- Defined in:
- lib/subduino/parse/bool.rb
Instance Method Summary collapse
Methods inherited from Digital
#digital?, #graph, #initialize, #name, #raw, #sparkline, #type
Constructor Details
This class inherits a constructor from Subduino::Parse::Digital
Instance Method Details
#parse ⇒ Object
4 5 6 |
# File 'lib/subduino/parse/bool.rb', line 4 def parse @v.zero? ? false : true end |
#to_s ⇒ Object
8 9 10 |
# File 'lib/subduino/parse/bool.rb', line 8 def to_s parse ? "ON" : "OFF" end |