Class: DSP::ValueFormat
Overview
interface ValueFormat {
/** Display the value in hex. */
hex?: boolean;
}
Instance Attribute Summary collapse
-
#hex ⇒ Object
type: boolean.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ ValueFormat
constructor
A new instance of ValueFormat.
Methods inherited from DSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ ValueFormat
Returns a new instance of ValueFormat.
4438 4439 4440 4441 |
# File 'lib/dsp/dsp_protocol.rb', line 4438 def initialize(initial_hash = nil) super @optional_method_names = %i[hex] end |
Instance Attribute Details
#hex ⇒ Object
type: boolean
4436 4437 4438 |
# File 'lib/dsp/dsp_protocol.rb', line 4436 def hex @hex end |
Instance Method Details
#from_h!(value) ⇒ Object
4443 4444 4445 4446 4447 |
# File 'lib/dsp/dsp_protocol.rb', line 4443 def from_h!(value) value = {} if value.nil? self.hex = value['hex'] # Unknown type self end |