Class: Gemaker::Cmd::AddReadme

Inherits:
Base
  • Object
show all
Defined in:
lib/gemaker/commands/add_readme.rb

Instance Method Summary collapse

Methods inherited from Base

#perform

Methods included from Util

#copy_file, #copy_template, #create_dir, #error, #execute, #execute_in_gem, #gem_root_path, #get_destination_path, #get_template_path, #info, #parse_erb, #remove_in_gem, #utils_path

Instance Method Details

#in_engine_contextObject



9
10
11
12
13
# File 'lib/gemaker/commands/add_readme.rb', line 9

def in_engine_context
  remove_in_gem("README.rdoc")
  copy_template("engine/README.md", "README.md", config: @config)
  info "Replace README.md"
end

#in_normal_contextObject



4
5
6
7
# File 'lib/gemaker/commands/add_readme.rb', line 4

def in_normal_context
  copy_template("normal/README.md", "README.md", config: @config)
  info "Replace README.md"
end