Class: FakeSmith::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/fake_smith.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



105
106
107
# File 'lib/fake_smith.rb', line 105

def initialize
  @logs = {}
end

Instance Attribute Details

#logsObject (readonly)

Returns the value of attribute logs.



103
104
105
# File 'lib/fake_smith.rb', line 103

def logs
  @logs
end

Instance Method Details

#log(level) ⇒ Object



109
110
111
# File 'lib/fake_smith.rb', line 109

def log(level)
  @logs[level] ||= []
end