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.
105 106 107 |
# File 'lib/fake_smith.rb', line 105 def initialize @logs = {} end |
Instance Attribute Details
#logs ⇒ Object (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 |