Class: Gemsmith::Skeletons::RubocopSkeleton

Inherits:
BaseSkeleton show all
Defined in:
lib/gemsmith/skeletons/rubocop_skeleton.rb

Overview

Configures Rubocop support.

Instance Method Summary collapse

Methods inherited from BaseSkeleton

create, #initialize

Constructor Details

This class inherits a constructor from Gemsmith::Skeletons::BaseSkeleton

Instance Method Details

#createObject



9
10
11
12
13
14
# File 'lib/gemsmith/skeletons/rubocop_skeleton.rb', line 9

def create
  return unless enabled?

  cli.template "%gem_name%/.rubocop.yml.tt", cli.template_options
  cli.template "%gem_name%/lib/%gem_name%/tasks/rubocop.rake.tt", cli.template_options
end

#enabled?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/gemsmith/skeletons/rubocop_skeleton.rb', line 5

def enabled?
  cli.template_options.key?(:rubocop) && cli.template_options[:rubocop]
end