Class: Falcon::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Falcon::Command::Top
- Defined in:
- lib/falcon/command.rb
Instance Method Summary collapse
Instance Method Details
#invoke(program_name: File.basename($0)) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/falcon/command.rb', line 56 def invoke(program_name: File.basename($0)) if verbose? Async.logger.level = Logger::DEBUG elsif quiet? Async.logger.level = Logger::WARN else Async.logger.level = Logger::INFO end if [:version] puts "falcon v#{Falcon::VERSION}" elsif [:help] or @command.nil? print_usage(program_name) else @command.invoke(self) end end |
#quiet? ⇒ Boolean
52 53 54 |
# File 'lib/falcon/command.rb', line 52 def quiet? [:logging] == :quiet end |
#verbose? ⇒ Boolean
48 49 50 |
# File 'lib/falcon/command.rb', line 48 def verbose? [:logging] == :verbose end |