Class: Utopia::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Utopia::Command::Top
- Defined in:
- lib/utopia/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
56 57 58 59 60 61 62 63 64 |
# File 'lib/utopia/command.rb', line 56 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.
52 53 54 |
# File 'lib/utopia/command.rb', line 52 def root File.(@options.fetch(:root, ''), Dir.getwd) end |