Class: Utopia::Command::Top

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/utopia/command.rb

Instance Method Summary collapse

Instance Method Details

#invoke(program_name: File.basename($0)) ⇒ Object



255
256
257
258
259
260
261
262
263
264
265
# File 'lib/utopia/command.rb', line 255

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

#rootObject



251
252
253
# File 'lib/utopia/command.rb', line 251

def root
	File.expand_path(@options.fetch(:root, ''), Dir.getwd)
end