class Numeric

Public Instance Methods

add_percent(percent) click to toggle source
# File lib/finishing_moves/numeric.rb, line 12
def add_percent(percent)
  self.to_f + ( self.to_f * ( percent.to_f / 100.0 ) )
end
Also aliased as: markup_by_percent
digits()
Alias for: length
length() click to toggle source
# File lib/finishing_moves/numeric.rb, line 2
def length
  raise ArgumentError.new("Cannot get length: \"#{self}\" is not an integer")
end
Also aliased as: digits
markup_by_percent(percent)
Alias for: add_percent
percentage_off(percent)
Alias for: subtract_percent
subtract_percent(percent) click to toggle source
# File lib/finishing_moves/numeric.rb, line 7
def subtract_percent(percent)
  self.to_f * ( ( 100.0 - percent.to_f ) / 100.0 )
end
Also aliased as: percentage_off