Class: Pragmater::CLI::Commands::Insert

Inherits:
Sod::Command
  • Object
show all
Defined in:
lib/pragmater/cli/commands/insert.rb

Overview

Inserts pragmas.

Instance Method Summary collapse

Constructor Details

#initialize(handler: Inserter.new) ⇒ Insert

Returns a new instance of Insert.



20
21
22
23
# File 'lib/pragmater/cli/commands/insert.rb', line 20

def initialize(handler: Inserter.new, **)
  super(**)
  @handler = handler
end

Instance Method Details

#callObject



25
# File 'lib/pragmater/cli/commands/insert.rb', line 25

def call = handler.call { |path| io.puts path }