Sha256: 9aa6e1ae5a1e741f13cdd97360fa9c9314a8634e8ddaa613391f3f7b25018d3d

Contents?: true

Size: 230 Bytes

Versions: 2

Compression:

Stored size: 230 Bytes

Contents

require 'facets/ruby' #for Binding#eval

class Binding

  # Returns the nature of something within the context of the binding.
  # Returns nil if that thing is not defined.

  def defined?(x)
    eval("defined? #{x}")
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facets-2.4.0 lib/facets/binding/defined.rb
facets-2.4.1 lib/facets/binding/defined.rb