Sha256: b3718bf4017a90f558998a19e9b484219036b8dd5c797b1904e5bb2872ad41cc

Contents?: true

Size: 565 Bytes

Versions: 45

Compression:

Stored size: 565 Bytes

Contents

require "active_merchant/billing/compatibility"
require "active_merchant/empty"

module ActiveMerchant
  module Billing
    class Model
      include Compatibility::Model
      include Empty

      def initialize(attributes = {})
        attributes.each do |key, value|
          send("#{key}=", value)
        end
      end

      def validate
        {}
      end

      private

      def errors_hash(array)
        array.inject({}) do |hash, (attribute, error)|
          (hash[attribute] ||= []) << error
          hash
        end
      end
    end
  end
end

Version data entries

45 entries across 44 versions & 4 rubygems

Version Path
activemerchant-1.46.0 lib/active_merchant/billing/model.rb
activemerchant-1.45.0 lib/active_merchant/billing/model.rb
aktivemerchant-2.0.0 lib/active_merchant/billing/model.rb
activemerchant-1.44.1 lib/active_merchant/billing/model.rb
activemerchant-1.44.0 lib/active_merchant/billing/model.rb