Class: DoubleEntry::Account::Set

Inherits:
Array
  • Object
show all
Defined in:
lib/double_entry/account.rb

Instance Method Summary collapse

Instance Method Details

#<<(account) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/double_entry/account.rb', line 5

def <<()
  if detect { |a| a.identifier == .identifier }
    raise DuplicateAccount.new
  else
    super()
  end
end