Class: Napa::CLI::Generate

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/napa/cli/generate.rb,
lib/napa/cli/generate/api.rb,
lib/napa/cli/generate/readme.rb

Instance Method Summary collapse

Instance Method Details

#api(name) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/napa/cli/generate/api.rb', line 11

def api(name)
  @name = name

  self.class.source_root File.expand_path("../../templates/api", __FILE__)
  say 'Generating api...'
  directory '.', output_directory
  say 'Done!', :green
end

#readmeObject



14
15
16
17
18
19
# File 'lib/napa/cli/generate/readme.rb', line 14

def readme
  self.class.source_root File.expand_path("../../templates/readme", __FILE__)
  say 'Generating README...'
  directory '.', output_directory
  say 'Done!', :green
end