Module: Openplacos::Analog
Overview
Namespace for Analog signals.
Defined Under Namespace
Instance Method Summary collapse
-
#render ⇒ Object
render method is supposed to be overlaoded this method is like a view this method returns a string formatted as needed for the client to express an analog value.
-
#to_s ⇒ Object
convert an analog value to a string supposed to be generic to all clients can be easily overloaded if needed.
Instance Method Details
#render ⇒ Object
render method is supposed to be overlaoded this method is like a view this method returns a string formatted as needed for the client to express an analog value
32 33 34 |
# File 'lib/openplacos/widget/Analog.rb', line 32 def render return to_s end |
#to_s ⇒ Object
convert an analog value to a string supposed to be generic to all clients can be easily overloaded if needed
25 26 27 |
# File 'lib/openplacos/widget/Analog.rb', line 25 def to_s read({}).round(2).to_s end |