Class: Ondotori::WebAPI::Api::LatestDataParams
- Inherits:
-
ParamsBase
- Object
- ParamsBase
- Ondotori::WebAPI::Api::LatestDataParams
- Defined in:
- lib/ondotori/webapi/api/params.rb
Instance Method Summary collapse
-
#initialize(param, serial: "") ⇒ LatestDataParams
constructor
A new instance of LatestDataParams.
- #to_ondotori_param ⇒ Object
Constructor Details
#initialize(param, serial: "") ⇒ LatestDataParams
Returns a new instance of LatestDataParams.
44 45 46 47 48 49 50 51 52 |
# File 'lib/ondotori/webapi/api/params.rb', line 44 def initialize(param, serial: "") super(param) if serial.empty? raise Ondotori::WebAPI::Api::Errors::InvaildParameter.new( "latest-data need remote-serial", 9994 ) end @remote_serial = serial end |
Instance Method Details
#to_ondotori_param ⇒ Object
54 55 56 57 58 59 |
# File 'lib/ondotori/webapi/api/params.rb', line 54 def to_ondotori_param params = super params["remote-serial"] = @remote_serial params end |