Sha256: 19cde43d58534afd435c61df77dfe5236bc3c17329e0af5a5e14b2d394fdd5d1
Contents?: true
Size: 601 Bytes
Versions: 13
Compression:
Stored size: 601 Bytes
Contents
module IB module Models # Base IB data Model class, in future it will be developed into ActiveModel class Model attr_reader :created_at # If a opts hash is given, keys are taken as attribute names, values as data. # The model instance fields are then set automatically from the opts Hash. # def initialize(opts={}) raise ArgumentError.new("Argument must be a Hash") unless opts.is_a?(Hash) @created_at = Time.now opts.keys.each { |key| self.send("#{key}=", opts[key]) } end end # Model end # module Models end # module IB
Version data entries
13 entries across 13 versions & 1 rubygems