Module: Introspect

Defined in:
lib/introspect.rb,
lib/introspect/which.rb,
lib/introspect/version.rb

Defined Under Namespace

Modules: CLI Classes: Contents, Which

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.introspect(obj, command = nil, opts = nil) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/introspect.rb', line 17

def self.introspect obj, command = nil, opts = nil
  case command
  when :which then Introspect::Which.which obj, opts
  when :contents then  Introspect::Contents.contents obj, opts
  else
    raise ArgumentError, "unrecognized command: #{command}"
  end
end

Instance Method Details

#introspect(command = nil, opts = nil) ⇒ Object



26
27
28
# File 'lib/introspect.rb', line 26

def introspect command = nil, opts = nil
  Introspect.introspect self, command, opts
end