Method: Ruber::AbstractProject#match_rule?
- Defined in:
- lib/ruber/project.rb
#match_rule?(obj) ⇒ Boolean
Tells whether the project matches the rule specified in the object obj. obj is an object with at least the following methods:
-
scope -
mimetype -
file_extension
This implementation returns true if obj.scope includes the value returned by self.scope (using this method requires subclassing AbstractProject, since AbstractProject#scope raises an exception). Subclasses may override this method to introduce other conditions. However, they’ll most likely always want to call the base class implementation.
158 159 160 |
# File 'lib/ruber/project.rb', line 158 def match_rule? obj obj.scope.include? self.scope end |