Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/picklive/currency.rb

Instance Method Summary collapse

Instance Method Details

#chipsObject



221
222
223
# File 'lib/picklive/currency.rb', line 221

def chips
  Picklive::Currency::Chips.new(self)
end

#penniesObject Also known as: pence



208
209
210
# File 'lib/picklive/currency.rb', line 208

def pennies
  Picklive::Currency::GBP.new(self)
end

#percentObject



199
200
201
# File 'lib/picklive/currency.rb', line 199

def percent
  self.to_f / 100
end

#poundsObject Also known as: pound



203
204
205
# File 'lib/picklive/currency.rb', line 203

def pounds
  (self * 100).pennies
end

#to_penniesObject



217
218
219
# File 'lib/picklive/currency.rb', line 217

def to_pennies
  self * 100
end

#to_poundsObject



213
214
215
# File 'lib/picklive/currency.rb', line 213

def to_pounds
  self / 100.0
end