Class: Hanami::Reloader::Commands::Install

Inherits:
CLI::Command
  • Object
show all
Defined in:
lib/hanami/reloader/commands.rb

Overview

Generate hanami-reloader configuration

Constant Summary collapse

MATCHER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

NOTE: Any change to this constant MUST be reflected in the ‘#generate_configuration` method,

by copying and pasting this regex.

Since:

  • 2.1.0

%r{^(app|config|lib|slices)([\\/][^\\/]+)*\.(rb|erb|haml|slim)$}i

Instance Method Summary collapse

Constructor Details

#initialize(fs: Dry::Files.new, **args) ⇒ Install

Returns a new instance of Install.



34
35
36
# File 'lib/hanami/reloader/commands.rb', line 34

def initialize(fs: Dry::Files.new, **args)
  super
end

Instance Method Details

#callObject



38
39
40
# File 'lib/hanami/reloader/commands.rb', line 38

def call(*, **)
  generate_configuration(Guardfile.default_path)
end