Class: Baseline::Install
- Inherits:
-
Object
- Object
- Baseline::Install
- Defined in:
- lib/baseline/install.rb
Constant Summary collapse
- STUBS =
{ ".rubocop.yml" => <<~YAML, ".erb_lint.yml" => <<~YAML inherit_gem: rubykatzen-baseline: config/erb_lint.yml # Generate .erb_lint_todo.yml, then uncomment inherit_from below: # bundle exec erb_lint --enable-all-linters --lint-all # inherit_from: # - .erb_lint_todo.yml YAML }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(root) ⇒ Install
constructor
A new instance of Install.
Constructor Details
Instance Method Details
#call ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/baseline/install.rb', line 30 def call STUBS.each do |relative_path, content| target = File.join(@root, relative_path) if File.exist?(target) warn "skip #{relative_path} (already exists)" next end File.write(target, content) warn "create #{relative_path}" end end |