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
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 |
#root ⇒ Object
The root directory for the site.
36 37 38 |
# File 'lib/utopia/command.rb', line 36 def root File.(@options.fetch(:root, ''), Dir.getwd) end |