Class: Rexer::Commands::Verbosity
- Inherits:
-
Object
- Object
- Rexer::Commands::Verbosity
- Defined in:
- lib/rexer/commands.rb
Constant Summary collapse
- LEVELS =
i[error info debug].freeze
Instance Method Summary collapse
Instance Method Details
#on(level, &block) ⇒ Object
25 26 27 |
# File 'lib/rexer/commands.rb', line 25 def on(level, &block) on?(level) ? block.call : nil end |
#on?(level) ⇒ Boolean
21 22 23 |
# File 'lib/rexer/commands.rb', line 21 def on?(level) LEVELS.index(current_level) >= LEVELS.index(level) end |