Class: Smartdown::Model::Answer::Money

Inherits:
Base
  • Object
show all
Defined in:
lib/smartdown/model/answer/money.rb

Instance Attribute Summary

Attributes inherited from Base

#question, #value

Instance Method Summary collapse

Methods inherited from Base

#<=>, #initialize

Constructor Details

This class inherits a constructor from Smartdown::Model::Answer::Base

Instance Method Details

#humanizeObject



16
17
18
# File 'lib/smartdown/model/answer/money.rb', line 16

def humanize
  "£#{'%.2f' % value}"
end

#value_typeObject



12
13
14
# File 'lib/smartdown/model/answer/money.rb', line 12

def value_type
  ::Float
end