Sha256: 5929a733a9ea2c94faeeeca4894fe88730f8870d6e9f4bacc44219dee4741751

Contents?: true

Size: 231 Bytes

Versions: 1

Compression:

Stored size: 231 Bytes

Contents

class AppliedPercent < Struct.new(:percent)
  def + other
    other + self * other
  end

  def - other
    other - self * other
  end

  def * other
    other * percent.to_f
  end

  def / other
    other / percent.to_f
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
percentable-1.0.0 lib/percentable/applied_percent.rb