Class: Gorails::Commands::Example

Inherits:
Gorails::Command
  • Object
show all
Defined in:
lib/gorails/commands/example.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.helpObject



14
15
16
# File 'lib/gorails/commands/example.rb', line 14

def self.help
  "A dummy command.\nUsage: {{command:#{Gorails::TOOL_NAME} example}}"
end

Instance Method Details

#call(_args, _name) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/gorails/commands/example.rb', line 6

def call(_args, _name)
  puts "neato"

  if rand < 0.05
    raise(CLI::Kit::Abort, "you got unlucky!")
  end
end