Sha256: c1c7759b43eed7524602dc2178fdbfec167fc61235f4f25eff233bc990a6b42a
Contents?: true
Size: 1.26 KB
Versions: 3
Compression:
Stored size: 1.26 KB
Contents
require 'active_support' class StatisticsObject attr_accessor :id, :owner_id, :statistic_type, :timestamp, :group_condition def initialize(attributes) @id = attributes[:id] @owner_id = attributes[:owner_id] @statistic_type = attributes[:statistic_type] @timestamp = attributes[:timestamp] @group_condition = attributes[:group_condition] end def self.json_create(hash) new(hash.symbolize_keys) end end class Event attr_accessor :name, :count def initialize(attributes) @name = attributes[:name] @count = attributes[:count] end def self.json_create(hash) new(hash.symbolize_keys) end end class StatisticData attr_accessor :events, :original_id def initialize(attributes) @events = attributes[:events] @original_id = attributes[:original_id] end def self.json_create(hash) new(hash.symbolize_keys) end end class Account attr_accessor :firstname, :lastname, :contract, :company def initialize(attributes) @firstname = attributes[:firstname] @lastname = attributes[:lastname] @contract = attributes[:contract] @company = attributes[:company] @contract end def to_serialize [:firstname, :lastname, :contract, :company] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hoth-0.4.2 | example/business_objects.rb |
hoth-0.4.1 | example/business_objects.rb |
hoth-0.4.0 | example/business_objects.rb |