Class: CEML::Tagspec
- Inherits:
-
Struct
- Object
- Struct
- CEML::Tagspec
- Defined in:
- lib/ceml/models/cast.rb
Instance Attribute Summary collapse
-
#with ⇒ Object
Returns the value of attribute with.
-
#without ⇒ Object
Returns the value of attribute without.
Instance Method Summary collapse
Instance Attribute Details
#with ⇒ Object
Returns the value of attribute with
103 104 105 |
# File 'lib/ceml/models/cast.rb', line 103 def with @with end |
#without ⇒ Object
Returns the value of attribute without
103 104 105 |
# File 'lib/ceml/models/cast.rb', line 103 def without @without end |
Instance Method Details
#=~(c) ⇒ Object
104 105 106 107 |
# File 'lib/ceml/models/cast.rb', line 104 def =~(c) return false if (c[:tags]||[]).include?('new') and not with.include?('new') with.all?{ |t| (c[:tags]||[]).include?(t) } and without.all?{ |t| !(c[:tags]||[]).include?(t) } end |