Class: Spline::Command

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/spline/commands/command.rb

Direct Known Subclasses

NewCommand, ProcessCommand, SetupCommand, StepCommand

Class Method Summary collapse

Class Method Details

.aliasObject



18
19
20
# File 'lib/spline/commands/command.rb', line 18

def self.alias
  command_name
end

.command_nameObject

name refers to the class name with module. Spline::Command in this case



14
15
16
# File 'lib/spline/commands/command.rb', line 14

def self.command_name
  name.downcase[/\w+::(\w+)command/, 1]
end

.descriptionObject



26
27
28
# File 'lib/spline/commands/command.rb', line 26

def self.description
  "#{command_name} description"
end

.source_rootObject

root of project, from where we reference the templates



9
10
11
# File 'lib/spline/commands/command.rb', line 9

def self.source_root
  File.dirname(__FILE__) + "/.."
end

.usageObject



22
23
24
# File 'lib/spline/commands/command.rb', line 22

def self.usage
  command_name
end