Returns the non-namespaced class name of the plugin
@example Non-namespaced class name for Guard::RSpec
Guard::RSpec.non_namespaced_classname #=> "RSpec"
@return [String]
# File lib/guard/plugin/base.rb, line 30 def non_namespaced_classname self.to_s.sub('Guard::', '') end
Returns the non-namespaced name of the plugin
@example Non-namespaced name for Guard::RSpec
Guard::RSpec.non_namespaced_name #=> "rspec"
@return [String]
# File lib/guard/plugin/base.rb, line 43 def non_namespaced_name non_namespaced_classname.downcase end
Specify the source for the Guardfile template. Each Guard plugin can redefine this method to add its own logic.
@param [String] plugin_location the plugin location
# File lib/guard/plugin/base.rb, line 52 def template(plugin_location) File.read("#{ plugin_location }/lib/guard/#{ non_namespaced_name }/templates/Guardfile") end
Generated with the Darkfish Rdoc Generator 2.