class Ondotori::WebAPI::Api::LatestDataParams

Public Class Methods

new(param, serial: "") click to toggle source
Calls superclass method Ondotori::WebAPI::Api::ParamsBase::new
# 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

Public Instance Methods

to_ondotori_param() click to toggle source
# File lib/ondotori/webapi/api/params.rb, line 54
def to_ondotori_param
  params = super
  params["remote-serial"] = @remote_serial

  params
end