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
252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/utopia/command.rb', line 252 def invoke(program_name: File.basename($0)) if @options[:version] puts "utopia v#{VERSION}" elsif @options[:help] or @command.nil? print_usage(program_name) else track_time do @command.invoke(self) end end end |
#root ⇒ Object
248 249 250 |
# File 'lib/utopia/command.rb', line 248 def root File.(@options.fetch(:root, ''), Dir.getwd) end |