class Subledger::Domain::PostedLine

Attributes

balance[RW]
effective_at[R]
posted_at[R]

Public Class Methods

sub_klasses() click to toggle source
# File lib/subledger/domain/line.rb, line 241
def self.sub_klasses
  [ posted_klass ]
end

Private Class Methods

specialized_raise_unless_creatable(args) click to toggle source
# File lib/subledger/domain/line.rb, line 253
def self.specialized_raise_unless_creatable args
  effective_at = args[:effective_at]

  if effective_at.nil? or not effective_at.kind_of? Time
    raise PostedLineError, ':effective_at is required and must be a Time'
  end

  if args[:posted_at].nil?
    raise PostedLineError, ':posted_at is required'
  end
end

Public Instance Methods

posted?() click to toggle source
# File lib/subledger/domain/line.rb, line 245
def posted?
  true
end

Private Instance Methods

specialized_initialization(args) click to toggle source
# File lib/subledger/domain/line.rb, line 265
def specialized_initialization args
  @effective_at = utc_or_nil args[:effective_at]
  @posted_at    = utc_or_nil args[:posted_at]
  @balance      = args[:balance]
end