Class: Neospec::Logger::Symbols
- Inherits:
-
Object
- Object
- Neospec::Logger::Symbols
- Defined in:
- lib/neospec/logger/symbols.rb
Instance Method Summary collapse
-
#initialize(color: true, output: $stdout) ⇒ Symbols
constructor
A new instance of Symbols.
- #log(message, context: nil, result: nil) ⇒ Object
Constructor Details
#initialize(color: true, output: $stdout) ⇒ Symbols
Returns a new instance of Symbols.
4 5 6 7 |
# File 'lib/neospec/logger/symbols.rb', line 4 def initialize(color: true, output: $stdout) @color = color @output = output end |
Instance Method Details
#log(message, context: nil, result: nil) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/neospec/logger/symbols.rb', line 9 def log(, context: nil, result: nil) if context == :expect @output.write "#{ result.successful? ? "#{Neospec::Color::GREEN}✓" : "#{Neospec::Color::RED}✗" }#{Neospec::Color::RESET}" end end |