Sha256: d96f79ce3ea69c525a737f16cefdfbd21b63cf0294c0954d066283e687af4919

Contents?: true

Size: 569 Bytes

Versions: 4

Compression:

Stored size: 569 Bytes

Contents

module Shipcloud
  class Base
    include Shipcloud::Operations::Create
    include Shipcloud::Operations::Find

    # Initializes an object using the given attributes
    #
    # @param [Hash] attributes The attributes to use for initialization
    def initialize(attributes = {})
      set_attributes(attributes)
    end

    # Sets the attributes
    #
    # @param [Hash] attributes The attributes to initialize
    def set_attributes(attributes)
      attributes.each_pair do |key, value|
        instance_variable_set("@#{key}", value)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shipcloud-0.5.0 lib/shipcloud/base.rb
shipcloud-0.4.0 lib/shipcloud/base.rb
shipcloud-0.3.0 lib/shipcloud/base.rb
shipcloud-0.2.0 lib/shipcloud/base.rb