module PecCalcClient::RequestObject
Methods for request instance
Public Instance Methods
init_params(params)
click to toggle source
# File lib/pec_calc_client.rb, line 17 def init_params(params) params.each do |k, v| instance_variable_set("@#{k}", v) if self.class::PARAMS.include?(k.to_s) end end
to_h()
click to toggle source
# File lib/pec_calc_client.rb, line 23 def to_h self.class::PARAMS.map { |k| [k, instance_variable_get("@#{k}")] }.to_h end