Sha256: 3f3620e3c1a0a48c68c3409cd9988b04ee89820217f89191d0e6fb056cce8208

Contents?: true

Size: 341 Bytes

Versions: 6

Compression:

Stored size: 341 Bytes

Contents

# Adds several instance methods to NilClass.
class NilClass
  # Ex: nil.empty? => true
  def empty?; true; end
  def blank?; true; end

  def any?; false; end
  def include?(*args); false; end

  def strip; nil; end
  def truncate; nil; end

  #DO NOT override to_sym this since it breaks globalize
  #def to_sym; ""; end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rego-ruby-ext-0.0.6 lib/nil-ext.rb
rego-ruby-ext-0.0.5 lib/nil.rb
rego-ruby-ext-0.0.4 lib/nil.rb
rego-ruby-ext-0.0.3 lib/nil.rb
rego-ruby-ext-0.0.2 lib/nil.rb
rego-ruby-ext-0.0.1 lib/nil.rb