Exception: Guard::Guardfile::Generator::NoSuchPlugin

Inherits:
Error
  • Object
show all
Defined in:
lib/guard/guardfile/generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plugin_name) ⇒ NoSuchPlugin

Returns a new instance of NoSuchPlugin.



48
49
50
51
# File 'lib/guard/guardfile/generator.rb', line 48

def initialize(plugin_name)
  @plugin_name = plugin_name
  @class_name = plugin_name.delete("-").capitalize
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



46
47
48
# File 'lib/guard/guardfile/generator.rb', line 46

def class_name
  @class_name
end

#plugin_nameObject (readonly)

Returns the value of attribute plugin_name.



46
47
48
# File 'lib/guard/guardfile/generator.rb', line 46

def plugin_name
  @plugin_name
end

Instance Method Details

#messageObject



53
54
55
56
57
# File 'lib/guard/guardfile/generator.rb', line 53

def message
  "Could not load 'guard/#{plugin_name}'"\
  " or '~/.guard/templates/#{plugin_name}'"\
  " or find class Guard::#{class_name}\n"
end