Class: Guard::Compat::Test::Template
- Inherits:
-
Object
- Object
- Guard::Compat::Test::Template
- Defined in:
- lib/guard/compat/test/template.rb
Defined Under Namespace
Classes: Session
Instance Method Summary collapse
- #changed(file) ⇒ Object
-
#initialize(plugin_class) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(plugin_class) ⇒ Template
Returns a new instance of Template.
55 56 57 58 59 60 |
# File 'lib/guard/compat/test/template.rb', line 55 def initialize(plugin_class) name = plugin_class.to_s.sub('Guard::', '').downcase path = format('lib/guard/%s/templates/Guardfile', name) content = File.read(path) @session = Session.new(path, content) end |
Instance Method Details
#changed(file) ⇒ Object
62 63 64 |
# File 'lib/guard/compat/test/template.rb', line 62 def changed(file) @session.match(file) end |