Class: Object

Inherits:
BasicObject
Defined in:
lib/kamaze/project/core_ext/pp.rb,
lib/kamaze/project/core_ext/object.rb

Overview

Object is the default root of all Ruby objects

Object inherits from BasicObject which allows creating alternate object hierarchies. Methods on Object are available to all classes (unless explicitly overridden).

Instance Method Summary collapse

Instance Method Details

#pp(*objs) ⇒ Object (private)

Print arguments in pretty form



20
21
22
23
24
25
# File 'lib/kamaze/project/core_ext/pp.rb', line 20

def pp(*objs)
  debug = Kamaze::Project::Debug.new
  objs.each { |obj| debug.dump(obj) }

  objs.size <= 1 ? objs.first : objs
end

#yield_self {|_self| ... } ⇒ Object

Yields self to the block and returns the result of the block.

Yields:

  • (_self)

Yield Parameters:

  • _self (Object)

    the object that the method was called on

Returns:

See Also:



23
24
25
# File 'lib/kamaze/project/core_ext/object.rb', line 23

def yield_self
  yield(self)
end