Module: RubySelectiveInspect::InstanceMethods
- Defined in:
- lib/ruby_selective_inspect.rb
Instance Method Summary collapse
-
#inspect(*whitelist) ⇒ Object
Public: Inspects this object in a customizable way.
Instance Method Details
#inspect(*whitelist) ⇒ Object
Public: Inspects this object in a customizable way.
whitelist - (optional) The names of the instance variables to be inspected
Examples
player = Player.new(id: 1, name: 'John', health: 100, ip_address: '192.168.1.133')
player.inspect # =>
player.inspect(:name) # =>
Returns the String that describes this object and its internals.
37 38 39 |
# File 'lib/ruby_selective_inspect.rb', line 37 def inspect(*whitelist) RubySelectiveInspect.perform_inspect(self, *whitelist) end |