Class: TaskwarriorWeb::TaskDynamicFinderMatch
- Inherits:
-
Object
- Object
- TaskwarriorWeb::TaskDynamicFinderMatch
- Defined in:
- lib/taskwarrior-web/model/task.rb
Overview
UTILITY CLASS FOR DYNAMIC FINDER MATCHING
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
Instance Method Summary collapse
-
#initialize(method_sym) ⇒ TaskDynamicFinderMatch
constructor
A new instance of TaskDynamicFinderMatch.
- #match? ⇒ Boolean
Constructor Details
#initialize(method_sym) ⇒ TaskDynamicFinderMatch
Returns a new instance of TaskDynamicFinderMatch.
148 149 150 151 152 |
# File 'lib/taskwarrior-web/model/task.rb', line 148 def initialize(method_sym) if method_sym.to_s =~ /^find_by_(.*)$/ @attribute = $1 end end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
146 147 148 |
# File 'lib/taskwarrior-web/model/task.rb', line 146 def attribute @attribute end |
Instance Method Details
#match? ⇒ Boolean
154 155 156 |
# File 'lib/taskwarrior-web/model/task.rb', line 154 def match? @attribute != nil end |