Class: Gurke::FeatureList::Filter::TagFilter
- Inherits:
-
Struct
- Object
- Struct
- Gurke::FeatureList::Filter::TagFilter
- Defined in:
- lib/gurke/feature_list.rb
Instance Attribute Summary collapse
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
Instance Attribute Details
#tag ⇒ Object
Returns the value of attribute tag
94 95 96 |
# File 'lib/gurke/feature_list.rb', line 94 def tag @tag end |
Instance Method Details
#match?(taggable) ⇒ Boolean
103 104 105 |
# File 'lib/gurke/feature_list.rb', line 103 def match?(taggable) negated? != taggable..any? {|t| t.name == name } end |
#name ⇒ Object
95 96 97 |
# File 'lib/gurke/feature_list.rb', line 95 def name @name ||= negated? ? tag[1..-1] : tag end |
#negated? ⇒ Boolean
99 100 101 |
# File 'lib/gurke/feature_list.rb', line 99 def negated? tag[0] == '~' end |