Included Modules

Files

Guard::Plugin::Base

Colection of shared methods between `Guard::Guard` (deprecated) and `Guard::Plugin`.

Attributes

callbacks[RW]
group[RW]
options[RW]
watchers[RW]

Public Class Methods

included(base) click to toggle source
# File lib/guard/plugin/base.rb, line 16
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

name() click to toggle source

Returns the plugin’s name (without “guard-”).

@example Name for Guard::RSpec

Guard::RSpec.new.name
#=> "rspec"

@return [String]

# File lib/guard/plugin/base.rb, line 131
def name
  @name ||= self.class.non_namespaced_name
end
title() click to toggle source

Returns the plugin’s class name without the Guard

namespace.

@example Title for Guard::RSpec

Guard::RSpec.new.title
#=> "RSpec"

@return [String]

# File lib/guard/plugin/base.rb, line 143
def title
  @title ||= self.class.non_namespaced_classname
end
to_s() click to toggle source

String representation of the plugin.

@example String representation of an instance of the Guard::RSpec plugin

Guard::RSpec.new.title
#=> "#<Guard::RSpec @name=rspec @group=#<Guard::Group @name=default @options={}> @watchers=[] @callbacks=[] @options={all_after_pass: true}>"

@return [String] the string representation

# File lib/guard/plugin/base.rb, line 155
def to_s
  "#<#{self.class} @name=#{name} @group=#{group} @watchers=#{watchers} @callbacks=#{callbacks} @options=#{options}>"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.