Class: Rackula::Command::Top

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

Overview

The top level utopia command.

Instance Method Summary collapse

Instance Method Details

#callObject



50
51
52
53
54
55
56
57
58
# File 'lib/rackula/command.rb', line 50

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.



46
47
48
# File 'lib/rackula/command.rb', line 46

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