class Laplus::Inspector

Attributes

object[R]

Public Class Methods

new(object) click to toggle source
# File lib/laplus/inspector.rb, line 7
def initialize(object)
  @object = object.freeze
end

Public Instance Methods

inspect() click to toggle source
# File lib/laplus/inspector.rb, line 11
def inspect
  inspect_strategy.inspect
end

Private Instance Methods

inspect_strategy() click to toggle source
# File lib/laplus/inspector.rb, line 17
def inspect_strategy
  case object
  when Method, UnboundMethod
    InspectStrategy::MethodStrategy.new(self)
  when Proc
    InspectStrategy::ProcStrategy.new(self)
  else
    raise NotImplementedError
  end
end