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.
96 97 98 |
# File 'lib/rio/entrysel.rb', line 96 def initialize(matches) super(matches.flatten.map { |arg| Match::Entry.create(arg) }) end |
Instance Method Details
#=~(el) ⇒ Object
99 100 101 |
# File 'lib/rio/entrysel.rb', line 99 def =~(el) (@match_to.empty? or @match_to.all? { |sel| sel =~ el }) end |