Class: Ondotori::WebAPI::Api::DataParams
- Inherits:
-
ParamsBase
- Object
- ParamsBase
- Ondotori::WebAPI::Api::DataParams
- Defined in:
- lib/ondotori/webapi/api/params.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(param, serial, data_range: nil) ⇒ DataParams
constructor
A new instance of DataParams.
- #to_ondotori_param ⇒ Object
- #validate(serial) ⇒ Object
Constructor Details
#initialize(param, serial, data_range: nil) ⇒ DataParams
Returns a new instance of DataParams.
84 85 86 87 88 89 |
# File 'lib/ondotori/webapi/api/params.rb', line 84 def initialize(param, serial, data_range: nil) super(param) validate(serial) @data_range = data_range @serial = serial end |
Instance Method Details
#to_ondotori_param ⇒ Object
99 100 101 102 103 104 105 |
# File 'lib/ondotori/webapi/api/params.rb', line 99 def to_ondotori_param params = super params["remote-serial"] = @serial @data_range&.add_data_range(params) params end |