Class: Utopia::Command::Top

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

Overview

The top level utopia command.

Instance Method Summary collapse

Instance Method Details

#callObject



40
41
42
43
44
45
46
47
48
# File 'lib/utopia/command.rb', line 40

def call
	if @options[:version]
		puts "#{self.name} v#{VERSION}"
	elsif @options[:help]
		print_usage(output: $stdout)
	else
		@command.call
	end
end

#rootObject

The root directory for the site.



36
37
38
# File 'lib/utopia/command.rb', line 36

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