Class: Todo::Data::Matcher
- Inherits:
-
Object
- Object
- Todo::Data::Matcher
- Includes:
- Helpers::Hash::Slice
- Defined in:
- lib/todo/data/matcher.rb
Constant Summary collapse
- ATTRS =
[:id, :text, :projects, :status, :after, :before]
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Instance Method Summary collapse
-
#initialize(item, data) ⇒ Matcher
constructor
A new instance of Matcher.
- #matches? ⇒ Boolean
Methods included from Helpers::Hash::Slice
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/todo/data/matcher.rb', line 10 def data @data end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
10 11 12 |
# File 'lib/todo/data/matcher.rb', line 10 def item @item end |
Instance Method Details
#matches? ⇒ Boolean
17 18 19 20 |
# File 'lib/todo/data/matcher.rb', line 17 def matches? return true if data.empty? data[:id] ? match_id : match_data end |