Module: Rango::LoggerMixin

Defined in:
lib/rango/mixins/logger.rb

Instance Method Summary collapse

Instance Method Details

#inspect(*args) ⇒ Object

Project.logger.inspect(@posts, item) Project.logger.inspect(“@post” => @post)

Since:

  • 0.0.1



8
9
10
11
12
13
14
15
16
17
# File 'lib/rango/mixins/logger.rb', line 8

def inspect(*args)
  if args.first.is_a?(Hash) && args.length.eql?(1)
    args.first.each do |name, value|
      self.debug("#{name}: #{value.inspect}")
    end
  else
    args = args.map { |arg| arg.inspect }
    self.debug(*args)
  end
end