Class: RIO::Match::Entry::And

Inherits:
Base show all
Defined in:
lib/rio/entrysel.rb

Instance Attribute Summary

Attributes inherited from Base

#match_to

Instance Method Summary collapse

Methods inherited from Base

#===, #inspect

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