module Kernel

Public Instance Methods

are(*args, &block)
Alias for: is
is(*args, &block) click to toggle source
# File lib/ruby_is.rb, line 53
def is(*args, &block);
  { __is__method_body: RubyIs.proc_or_block(args, block) }
end
Also aliased as: are
method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/ruby_is.rb, line 59
def method_missing(name, *args, &block)
  if (args.count == 1) and args.first.is_a?(Hash) and args.first.has_key?(:__is__method_body)
    define_method name, args.first[:__is__method_body]
    # at toplevel def creates private methods on Object
    if TOPLEVEL_BINDING.eval('self') == self # We are in the context of 'main' object
      private name
    end
  else
    super
  end
end