Sha256: 4e541ca6cedf15aad576d21c4c3fe46496208fdf145a48917f8899b6a01e08df

Contents?: true

Size: 650 Bytes

Versions: 7

Compression:

Stored size: 650 Bytes

Contents

require "pry"

module Guard
  module Commands
    class Change
      def self.import
        Pry::Commands.create_command "change" do
          group "Guard"
          description "Trigger a file change."

          banner <<-BANNER
          Usage: change <file> <other_file>

          Pass the given files to the Guard plugin `run_on_changes` action.
          BANNER

          def process(*files)
            if files.empty?
              output.puts "Please specify a file."
              return
            end

            ::Guard.async_queue_add(modified: files, added: [], removed: [])
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
guard-2.8.2 lib/guard/commands/change.rb
guard-2.8.1 lib/guard/commands/change.rb
guard-2.8.0 lib/guard/commands/change.rb
guard-2.7.3 lib/guard/commands/change.rb
guard-2.7.2 lib/guard/commands/change.rb
guard-2.7.1 lib/guard/commands/change.rb
guard-2.7.0 lib/guard/commands/change.rb