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
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
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