Class: Utopia::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Utopia::Command::Top
- Defined in:
- lib/utopia/command.rb
Instance Method Summary collapse
Instance Method Details
#invoke(program_name: File.basename($0)) ⇒ Object
327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/utopia/command.rb', line 327 def invoke(program_name: File.basename($0)) if [:version] puts "utopia v#{VERSION}" elsif [:help] or @command.nil? print_usage(program_name) else track_time do @command.invoke(self) end end end |
#root ⇒ Object
323 324 325 |
# File 'lib/utopia/command.rb', line 323 def root File.(.fetch(:root, ''), Dir.getwd) end |