Class: Rubysmith::Extensions::Pragmater
- Inherits:
-
Object
- Object
- Rubysmith::Extensions::Pragmater
- Defined in:
- lib/rubysmith/extensions/pragmater.rb
Overview
Ensures project skeleton has pragmas.
Constant Summary collapse
- CLIENT =
::Pragmater::Inserter.new( settings: ::Pragmater::Configuration::Model[ comments: ["# frozen_string_literal: true"], patterns: %w[ **/*.rake **/*.rb *.gemspec exe/* bin/console bin/rake bin/rspec bin/rubocop bin/setup config.ru Gemfile Rakefile ] ] ).freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client: CLIENT) ⇒ Pragmater
constructor
A new instance of Pragmater.
Constructor Details
Instance Method Details
#call ⇒ Object
39 40 41 42 43 |
# File 'lib/rubysmith/extensions/pragmater.rb', line 39 def call logger.info { "Adding frozen string literal pragmas..." } settings.project_root.change_dir { client.call } true end |