diff --git a/lib/guard.rb b/lib/guard.rb index cc58bfd..bfc3926 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -18,7 +18,6 @@ module Guard # Initialize the Guard singleton. # - # @param [Hash] options the Guard options. # @option options [Boolean] clear if auto clear the UI should be done # @option options [Boolean] notify if system notifications should be shown # @option options [Boolean] debug if debug output should be shown @@ -43,11 +42,11 @@ module Guard # Smart accessor for retrieving a specific guard or several guards at once. # - # @param [String, Symbol] filter return the guard with the given name, or nil if not found. - # @param [Regexp] filter returns all guards matching the Regexp, or [] if no guard found. + # @param [String, Symbol] filter return the guard with the given name, or nil if not found + # @param [Regexp] filter returns all guards matching the Regexp, or [] if no guard found # @param [Hash] filter returns all guards matching the given Hash. - # Example: `{ :name => 'rspec', :group => 'backend' }, or [] if no guard found. - # @param [NilClass] filter returns all guards. + # Example: `{ :name => 'rspec', :group => 'backend' }`, or [] if no guard found + # @param [NilClass] filter returns all guards # # @see Guard.groups # @@ -72,9 +71,9 @@ module Guard # Smart accessor for retrieving a specific group or several groups at once. # - # @param [NilClass] filter returns all groups. - # @param [String, Symbol] filter return the group with the given name, or nil if not found. - # @param [Regexp] filter returns all groups matching the Regexp, or [] if no group found. + # @param [NilClass] filter returns all groups + # @param [String, Symbol] filter return the group with the given name, or nil if not found + # @param [Regexp] filter returns all groups matching the Regexp, or [] if no group found # # @see Guard.guards # @@ -92,7 +91,6 @@ module Guard # Start Guard by evaluate the `Guardfile`, initialize the declared Guards # and start the available file change listener. # - # @param [Hash] options the Guard options. # @option options [Boolean] clear if auto clear the UI should be done # @option options [Boolean] notify if system notifications should be shown # @option options [Boolean] debug if debug output should be shown @@ -233,7 +231,7 @@ module Guard # @param [String] name the Guard name # @param [Array] watchers the list of declared watchers # @param [Array] callbacks the list of callbacks - # @param [Hash] options the Guard options + # @param [Hash] options the Guard options (see the given Guard documentation) # def add_guard(name, watchers = [], callbacks = [], options = {}) if name.to_sym == :ego @@ -248,9 +246,8 @@ module Guard # Add a Guard group. # # @param [String] name the group name - # @param [Hash] options the group options # @option options [Boolean] halt_on_fail if a task execution - # should be halted for all Guards in this group if one Guard throws `:task_has_failed` + # should be halted for all Guards in this group if one Guard throws `:task_has_failed` # @return [Guard::Group] the group added (or retrieved from the `@groups` variable if already present) # def add_group(name, options = {}) diff --git a/lib/guard/dsl.rb b/lib/guard/dsl.rb index a740822..ecb6dbc 100644 --- a/lib/guard/dsl.rb +++ b/lib/guard/dsl.rb @@ -81,7 +81,6 @@ module Guard # Evaluate the DSL methods in the `Guardfile`. # - # @param [Hash] options the Guard options # @option options [Array] groups the groups to evaluate # @option options [String] guardfile the path to a valid Guardfile # @option options [String] guardfile_contents a string representing the content of a valid Guardfile diff --git a/lib/guard/group.rb b/lib/guard/group.rb index 74ab16a..c8239b1 100644 --- a/lib/guard/group.rb +++ b/lib/guard/group.rb @@ -9,7 +9,6 @@ module Guard # Initialize a Group. # # @param [String] name the name of the group - # @param [Hash] options the group options # @option options [Boolean] halt_on_fail if a task execution # should be halted for all Guards in this group if one Guard throws `:task_has_failed` # diff --git a/lib/guard/guard.rb b/lib/guard/guard.rb index f63be8d..1449192 100644 --- a/lib/guard/guard.rb +++ b/lib/guard/guard.rb @@ -16,7 +16,7 @@ module Guard # Initialize a Guard. # # @param [Array] watchers the Guard file watchers - # @param [Hash] options the custom Guard options. + # @param [Hash] options the custom Guard options # def initialize(watchers = [], options = {}) @group = options[:group] ? options.delete(:group).to_sym : :default diff --git a/lib/guard/listener.rb b/lib/guard/listener.rb index 49701ab..a590c2a 100644 --- a/lib/guard/listener.rb +++ b/lib/guard/listener.rb @@ -43,7 +43,6 @@ module Guard # Initialize the listener. # # @param [String] directory the root directory to listen to - # @param [Hash] options the listener options # @option options [Boolean] relativize_paths use only relative paths # @option options [Array] ignore_paths the paths to ignore by the listener # @@ -187,7 +186,6 @@ module Guard # Gets a list of files that are in the modified directories. # # @param [Array] dirs the list of directories - # @param [Hash] options the options # @option options [Symbol] all whether to include all files # def potentially_modified_files(dirs, options = {}) diff --git a/lib/guard/notifier.rb b/lib/guard/notifier.rb index 8f84ed1..1ee20e5 100644 --- a/lib/guard/notifier.rb +++ b/lib/guard/notifier.rb @@ -43,7 +43,6 @@ module Guard # @see .image_path # # @param [String] the message to show - # @param [Hash] options the notification options # @option options [Symbol, String] image the image symbol or path to an image # @option options [String] title the notification title # @@ -80,7 +79,7 @@ module Guard # @param [Symbol, String] the image to user # @param [Hash] options the growl options # - def self.notify_mac(title, message, image, options) + def self.notify_mac(title, message, image, options = {}) require_growl # need for guard-rspec formatter that is called out of guard scope default_options = { :title => title, :icon => image_path(image), :name => APPLICATION_NAME } @@ -104,7 +103,7 @@ module Guard # @param [Symbol, String] the image to user # @param [Hash] options the libnotify options # - def self.notify_linux(title, message, image, options) + def self.notify_linux(title, message, image, options = {}) require_libnotify # need for guard-rspec formatter that is called out of guard scope default_options = { :body => message, :summary => title, :icon_path => image_path(image), :transient => true } Libnotify.show default_options.merge(options) if enabled? @@ -117,7 +116,7 @@ module Guard # @param [Symbol, String] the image to user # @param [Hash] options the notifu options # - def self.notify_windows(title, message, image, options) + def self.notify_windows(title, message, image, options = {}) require_rbnotifu # need for guard-rspec formatter that is called out of guard scope default_options = { :message => message, :title => title, :type => image_level(image), :time => 3 } Notifu.show default_options.merge(options) if enabled? diff --git a/lib/guard/ui.rb b/lib/guard/ui.rb index 51b2531..80ff7d4 100644 --- a/lib/guard/ui.rb +++ b/lib/guard/ui.rb @@ -10,7 +10,6 @@ module Guard # Show an info message. # # @param [String] message the message to show - # @param [Hash] options the options # @option options [Boolean] reset whether to clean the output before # def info(message, options = { }) @@ -23,7 +22,6 @@ module Guard # Show a red error message that is prefixed with ERROR. # # @param [String] message the message to show - # @param [Hash] options the options # @option options [Boolean] reset whether to clean the output before # def error(message, options = { }) @@ -36,7 +34,6 @@ module Guard # Show a red deprecation message that is prefixed with DEPRECATION. # # @param [String] message the message to show - # @param [Hash] options the options # @option options [Boolean] reset whether to clean the output before # def deprecation(message, options = { }) @@ -49,7 +46,6 @@ module Guard # Show a debug message that is prefixed with DEBUG and a timestamp. # # @param [String] message the message to show - # @param [Hash] options the options # @option options [Boolean] reset whether to clean the output before # def debug(message, options = { })