module Subledger::Domain

Public Class Methods

included(base) click to toggle source
# File lib/subledger/domain.rb, line 25
def self.included base
  base.extend DomainClass
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/subledger/domain.rb, line 47
def == other
  if respond_to?( :id )       and
     other.respond_to?( :id ) and
     ( ( not id.nil? ) and ( not other.id.nil? ) )
    id == other.id
  else
    super
  end
end
collection_name() click to toggle source
# File lib/subledger/domain.rb, line 57
def collection_name
  self.class.collection_name
end
entity_name() click to toggle source
# File lib/subledger/domain.rb, line 61
def entity_name
  self.class.entity_name
end
inspect()
Alias for: to_s
to_s() click to toggle source
# File lib/subledger/domain.rb, line 65
def to_s
  "#{entity_name}: #{ MultiJson.dump serializable_hash }"
end
Also aliased as: inspect

Private Instance Methods

short_klass_name() click to toggle source
# File lib/subledger/domain.rb, line 73
def short_klass_name
  self.class.name.match( /[^:]+$/ )[0] + ': '
end