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.



97
98
99
100
101
102
103
104
# File 'lib/rio/matchrecord.rb', line 97

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)


105
106
107
108
# File 'lib/rio/matchrecord.rb', line 105

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