Sha256: 300e478bb9a46de287e123d77b9826eccd34c159f5b90866dc2b40d8ade6db82

Contents?: true

Size: 476 Bytes

Versions: 51

Compression:

Stored size: 476 Bytes

Contents

class Range
  
  def self.at_least(minimum_value)
    Range.new(minimum_value, infinite)
  end
  
  def self.at_most(maximum_value)
    Range.new(-infinite, maximum_value, false)
  end
  
  def self.infinite
    1/0.0
  end
  
  def mocha_inspect
    if first.respond_to?(:to_f) and first.to_f.infinite? then
      return "at most #{last}"
    elsif last.respond_to?(:to_f) and last.to_f.infinite? then
      return "at least #{first}"
    else
      to_s
    end
  end
  
end

Version data entries

51 entries across 51 versions & 4 rubygems

Version Path
redcar-dev-0.12.1dev-java lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-dev-0.12.0dev-java lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.11 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.11.0dev lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.10 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.9.2 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.9.1 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.9.0 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.8.1 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.8 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.7 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.6.1 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.6 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.6.1dev lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5.1 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5 lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5.6dev lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5.5dev lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5.4dev lib/openssl/mocha/lib/mocha/infinite_range.rb
redcar-0.5.3dev lib/openssl/mocha/lib/mocha/infinite_range.rb