Class: Plans::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/plans/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Override for Thor. Have the application exit and return an error code on failure.

Returns:

  • (Boolean)


19
20
21
# File 'lib/plans/cli.rb', line 19

def self.exit_on_failure?
  true
end

.source_rootObject

Set the source root for Thor::Actions



13
14
15
# File 'lib/plans/cli.rb', line 13

def self.source_root
  Plans.source_root
end

Instance Method Details

#initObject



64
65
66
# File 'lib/plans/cli.rb', line 64

def init
  Init.new(shell, options).do
end

#listObject



48
49
50
# File 'lib/plans/cli.rb', line 48

def list
  List.new(shell, options).do
end

#new(doc_type) ⇒ Object



37
38
39
# File 'lib/plans/cli.rb', line 37

def new(doc_type)
  New.new(shell, options).do(doc_type)
end

#publish(path = '.') ⇒ Object



87
88
89
# File 'lib/plans/cli.rb', line 87

def publish(path = '.')
  Publish.new(shell, options).do(path)
end

#thumbs(path = '.') ⇒ Object



113
114
115
# File 'lib/plans/cli.rb', line 113

def thumbs(path = '.')
  Thumbs.new(shell, options).do(path)
end