Class: FakeSmith::Logger
- Inherits:
-
Object
- Object
- FakeSmith::Logger
- Defined in:
- lib/fake_smith.rb
Instance Attribute Summary collapse
-
#logs ⇒ Object
readonly
Returns the value of attribute logs.
Instance Method Summary collapse
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #log(level) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
106 107 108 |
# File 'lib/fake_smith.rb', line 106 def initialize @logs = {} end |
Instance Attribute Details
#logs ⇒ Object (readonly)
Returns the value of attribute logs.
104 105 106 |
# File 'lib/fake_smith.rb', line 104 def logs @logs end |
Instance Method Details
#log(level) ⇒ Object
110 111 112 |
# File 'lib/fake_smith.rb', line 110 def log(level) @logs[level] ||= [] end |