Sha256: 4d84ed9808d3ba198b30cbec43b8e25ab5a4a04ddb518401125aca4344677cfc
Contents?: true
Size: 457 Bytes
Versions: 33
Compression:
Stored size: 457 Bytes
Contents
module EventStatuses def self.included(base) base.class_eval { cattr_accessor :statuses extend ClassMethods include InstanceMethods } base.add_status(:id => 5, :name => 'Submitted') base.add_status(:id => 200, :name => 'Imported') end module ClassMethods def add_status(properties) statuses.push(Status.new(properties)) end end module InstanceMethods def to_s id end end end
Version data entries
33 entries across 33 versions & 1 rubygems