Class: Boty::Logger::Memory
- Inherits:
-
Logger
- Object
- Logger
- Boty::Logger::Memory
- Defined in:
- lib/boty/logger.rb
Instance Attribute Summary collapse
-
#logs ⇒ Object
readonly
Returns the value of attribute logs.
Instance Method Summary collapse
- #add(*args, &block) ⇒ Object
-
#initialize ⇒ Memory
constructor
A new instance of Memory.
Constructor Details
#initialize ⇒ Memory
Returns a new instance of Memory.
51 52 53 |
# File 'lib/boty/logger.rb', line 51 def initialize(*) @logs = [] end |
Instance Attribute Details
#logs ⇒ Object (readonly)
Returns the value of attribute logs.
49 50 51 |
# File 'lib/boty/logger.rb', line 49 def logs @logs end |
Instance Method Details
#add(*args, &block) ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/boty/logger.rb', line 55 def add(*args, &block) @logs << if block_given? block.call else args[2] end end |