Sha256: 5b8d1dce8f898f8cedd96dc5b89057cfc67ff6c0d311e2e31d816e8a0fa47f39
Contents?: true
Size: 1.67 KB
Versions: 9
Compression:
Stored size: 1.67 KB
Contents
require "guard/plugin/base" module Guard # @deprecated Inheriting from `Guard::Guard` is deprecated, please inherit # from {Plugin} instead. Please note that the constructor signature has # changed from `Guard::Guard#initialize(watchers = [], options = {})` to # `Guard::Plugin#initialize(options = {})`. # # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to # upgrade for Guard 2.0 # class Guard include ::Guard::Plugin::Base # @deprecated Inheriting from `Guard::Guard` is deprecated, please inherit # from {Plugin} instead. Please note that the constructor signature # has changed from `Guard::Guard#initialize(watchers = [], options = {})` # to `Guard::Plugin#initialize(options = {})`. # # Initializes a Guard plugin. Don't do any work here, # especially as Guard plugins get initialized even if they are not in an # active group! # # @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to # upgrade for Guard 2.0 # # @param [Array<Guard::Watcher>] watchers the Guard plugin file watchers # @param [Hash] options the custom Guard plugin options # @option options [Symbol] group the group this Guard plugin belongs to # @option options [Boolean] any_return allow any object to be returned from # a watcher # @option options [Boolean] first_match stop after the first watcher that # returns a valid result # def initialize(watchers = [], options = {}) UI.deprecation(Deprecator::GUARD_GUARD_DEPRECATION % title) _set_instance_variables_from_options(options.merge(watchers: watchers)) _register_callbacks end end end
Version data entries
9 entries across 7 versions & 1 rubygems