Sha256: 12ae1f5c32bc0f67a680b66da275fd33d73bc29cae35c9c1acb3cea42508df67
Contents?: true
Size: 947 Bytes
Versions: 1
Compression:
Stored size: 947 Bytes
Contents
module Moceansdk module Modules module Command module McObject class AbstractMc def initialize(params = nil) @params = {} @params = Moceansdk::Utils.convert_to_symbol_hash(params) unless params.nil? end def get_request_data @params = Moceansdk::Utils.convert_to_symbol_hash(@params) required_key.each do |key| if @params[:"#{key}"].nil? raise Moceansdk::Exceptions::RequiredFieldException, "#{key} is mandatory field, can't leave empty (#{self})" end end @params[:action] = action @params end def required_key raise NotImplementedError, 'AbstractMc is a abstract class' end def action raise NotImplementedError, 'AbstractMc is a abstract class' end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
moceansdk-1.1.1 | lib/moceansdk/modules/command/mc_object/abstract_mc.rb |