Class: RIO::Match::Record::And

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

Instance Method Summary collapse

Methods inherited from Base

#inspect, #match_all?, #match_none?, #val

Constructor Details

#initialize(matches, therio) ⇒ And

Returns a new instance of And.



82
83
84
85
86
87
88
89
# File 'lib/rio/matchrecord.rb', line 82

def initialize(matches,therio)
  list = []
  matches.each do |arg|
    list << Match::Record.create(therio,arg)
  end
  super(list)
  @therio = therio
end

Instance Method Details

#match?(val, recno) ⇒ Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/rio/matchrecord.rb', line 90

def match?(val,recno)
  @select_arg.all? { |sel| sel.match?(val,recno) }
end