Sha256: 0b9a6819ed50e54b14ca3f7b2aded72fc323af1345a8036142db23c0495ad1f2

Contents?: true

Size: 145 Bytes

Versions: 10

Compression:

Stored size: 145 Bytes

Contents

module Flipper
  module Expressions
    class Percentage
      def self.call(value)
        value.to_f.clamp(0, 100)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flipper-1.3.2 lib/flipper/expressions/percentage.rb
flipper-1.3.1 lib/flipper/expressions/percentage.rb
flipper-1.3.0 lib/flipper/expressions/percentage.rb
flipper-1.3.0.pre lib/flipper/expressions/percentage.rb
flipper-1.2.2 lib/flipper/expressions/percentage.rb
flipper-1.2.1 lib/flipper/expressions/percentage.rb
flipper-1.2.0 lib/flipper/expressions/percentage.rb
flipper-1.1.2 lib/flipper/expressions/percentage.rb
flipper-1.1.1 lib/flipper/expressions/percentage.rb
flipper-1.1.0 lib/flipper/expressions/percentage.rb