Class: RIO::Match::Entry::And
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #=~(el) ⇒ Object
-
#initialize(matches) ⇒ And
constructor
A new instance of And.
Methods inherited from Base
Constructor Details
#initialize(matches) ⇒ And
Returns a new instance of And.
85 86 87 |
# File 'lib/rio/entrysel.rb', line 85 def initialize(matches) super(matches.flatten.map { |arg| Match::Entry.create(arg) }) end |
Instance Method Details
#=~(el) ⇒ Object
88 89 90 |
# File 'lib/rio/entrysel.rb', line 88 def =~(el) (@match_to.empty? or @match_to.all? { |sel| sel =~ el }) end |