Class: Rackula::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Rackula::Command::Top
- Defined in:
- lib/rackula/command.rb
Overview
The top level utopia command.
Instance Method Summary collapse
- #call ⇒ Object
-
#root ⇒ Object
The root directory for the site.
Instance Method Details
#call ⇒ Object
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 |
#root ⇒ Object
The root directory for the site.
46 47 48 |
# File 'lib/rackula/command.rb', line 46 def root File.(@options.fetch(:root, ''), Dir.getwd) end |