Sha256: e4b8d692525e7475531df244c1f2e269f88f0d92c1c00e720f08cbb2da8b1615
Contents?: true
Size: 585 Bytes
Versions: 1
Compression:
Stored size: 585 Bytes
Contents
module Paymill class Base include Paymill::Operations::All include Paymill::Operations::Create include Paymill::Operations::Find attr_accessor :created_at, :updated_at def initialize(attributes = {}) set_attributes(attributes) parse_timestamps end def set_attributes(attributes) attributes.each_pair do |key, value| instance_variable_set("@#{key}", value) end end def parse_timestamps @created_at = Time.at(created_at) if created_at @updated_at = Time.at(updated_at) if updated_at end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paymill-0.2.2 | lib/paymill/base.rb |