class DHL::Ecommerce::Base

Public Class Methods

new(attributes = {}) click to toggle source
# File lib/dhl/ecommerce/base.rb, line 4
def initialize(attributes = {})
  attributes.each do |attribute, value|
    next if attribute.to_sym == :class

    if respond_to? "#{attribute}="
      send "#{attribute}=", value
    elsif respond_to?("#{attribute}")
      instance_variable_set "@#{attribute}", value
    end
  end unless attributes.empty?
end

Private Class Methods

resource_name() click to toggle source
# File lib/dhl/ecommerce/base.rb, line 17
def self.resource_name
  self.name.split("::").last
end