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.
135 136 137 138 139 |
# File 'lib/taskwarrior-web/model/task.rb', line 135 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.
133 134 135 |
# File 'lib/taskwarrior-web/model/task.rb', line 133 def attribute @attribute end |
Instance Method Details
#match? ⇒ Boolean
141 142 143 |
# File 'lib/taskwarrior-web/model/task.rb', line 141 def match? @attribute != nil end |