Sha256: 7b27d860d8bef473d869a536bd760317d40f920bc2b3da7acb7e12c846a245c5

Contents?: true

Size: 424 Bytes

Versions: 16

Compression:

Stored size: 424 Bytes

Contents

class Object
  unless defined?(try)
    def try(method, *options, &block)
      send(method, *options, &block)
    end
  end

  # These methods are added to all objects so we could call proxy? on anything
  # and figure if an object is a proxy w/o hitting method_missing or respond_to?
  def self.proxy?
    false
  end

  def proxy?
    false
  end
end

class NilClass
  def try(method, *options, &block)
    nil
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
yam-db-charmer-1.7.4.14 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.4.13 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.4.10 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.4.9 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.4.8 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.4.0 lib/db_charmer/core_extensions.rb
yam-db-charmer-1.7.01 lib/db_charmer/core_extensions.rb
db-charmer-1.7.1 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre7 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre6 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre5 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre4 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre3 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre2 lib/db_charmer/core_extensions.rb
db-charmer-1.7.0.pre1 lib/db_charmer/core_extensions.rb