class DiscountNetwork::Base
Public Class Methods
method_missing(method_name, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/discountnetwork/base.rb, line 3 def self.method_missing(method_name, *arguments, &block) if new.respond_to?(method_name, include_private: false) new.send(method_name, *arguments, &block) else super end end
Private Instance Methods
build_array_params(array_params)
click to toggle source
# File lib/discountnetwork/base.rb, line 13 def build_array_params(array_params) array_params = [array_params].flatten array_params.map.each_with_index do |attribute, index| [index, attribute] end.to_h end