class Ondotori::WebAPI::Api::DataRTR500Params

Public Class Methods

new(param, serial, base, data_range: nil) click to toggle source
Calls superclass method Ondotori::WebAPI::Api::DataParams::new
# File lib/ondotori/webapi/api/params.rb, line 109
def initialize(param, serial, base, data_range: nil)
  super(param, serial, data_range: data_range)
  validate_base(base)
  @base =  base
end

Public Instance Methods

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

  params
end
validate_base(base) click to toggle source
# File lib/ondotori/webapi/api/params.rb, line 115
def validate_base(base)
  unless base.instance_of?(String)
    raise Ondotori::WebAPI::Api::Errors::InvaildParameter.new(
      "base unit serial must be String.", 9991
    )
  end
end