class Object

Public Instance Methods

thru(callable = nil) { |self| ... } click to toggle source
# File lib/object_thru.rb, line 4
def thru(callable = nil)
  if callable.respond_to?(:call)
    callable.call(self)
  elsif block_given?
    yield self
  end
end