Sha256: 7068f3b04e05857620c54dae597f0dda486c2cdc5bd72230085cbc7a77ed188a

Contents?: true

Size: 836 Bytes

Versions: 7

Compression:

Stored size: 836 Bytes

Contents

require "pry"

require "guard"

module Guard
  module Commands
    class Reload
      def self.import
        Pry::Commands.create_command "reload" do
          group "Guard"
          description "Reload all plugins."

          banner <<-BANNER
          Usage: reload <scope>

          Run the Guard plugin `reload` action.

          You may want to specify an optional scope to the action,
          either the name of a Guard plugin or a plugin group.
          BANNER

          def process(*entries)
            scopes, unknown = Guard.state.session.convert_scope(entries)

            unless unknown.empty?
              output.puts "Unknown scopes: #{ unknown.join(", ") }"
              return
            end

            Guard.async_queue_add([:guard_reload, scopes])
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
guard-2.12.4 lib/guard/commands/reload.rb
guard-2.12.3 lib/guard/commands/reload.rb
guard-2.12.2 lib/guard/commands/reload.rb
guard-2.12.1 lib/guard/commands/reload.rb
guard-2.12.0 lib/guard/commands/reload.rb
guard-2.11.1 lib/guard/commands/reload.rb
guard-2.11.0 lib/guard/commands/reload.rb