Class: Coradoc::Element::AttributeList::Matchers::One
- Inherits:
-
Object
- Object
- Coradoc::Element::AttributeList::Matchers::One
- Defined in:
- lib/coradoc/element/attribute_list.rb
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(*possibilities) ⇒ One
constructor
A new instance of One.
Constructor Details
#initialize(*possibilities) ⇒ One
Returns a new instance of One.
108 109 110 |
# File 'lib/coradoc/element/attribute_list.rb', line 108 def initialize(*possibilities) @possibilities = possibilities end |
Instance Method Details
#===(other) ⇒ Object
112 113 114 |
# File 'lib/coradoc/element/attribute_list.rb', line 112 def ===(other) @possibilities.any? { |i| i === other } end |