Class: Coradoc::Element::AttributeList::Matchers::One

Inherits:
Object
  • Object
show all
Defined in:
lib/coradoc/element/attribute_list.rb

Instance Method Summary collapse

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