Class: Balance

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/balance.rb

Instance Method Summary collapse

Instance Method Details

#balanceObject



5
6
7
# File 'app/models/balance.rb', line 5

def balance
  super or self.balance = calculate_balance
end

#readonly?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/balance.rb', line 9

def readonly?
  !new_record?
end