Class: Kaiseki::SequenceParser

Inherits:
MultiParser show all
Defined in:
lib/parser_sequence.rb

Instance Attribute Summary

Attributes inherited from BasicParser

#expected

Instance Method Summary collapse

Methods inherited from MultiParser

#append, #initialize, #to_s

Methods inherited from BasicParser

#eql?, #initialize, #to_s

Methods included from Parseable

#action, #and?, #cast, #filter, #list, #merge, #not!, #one_or_more, #optional, #override, #parse, #protect, #repeat, #set, #skip, #tag_error, #tag_result, #to_parseable, #validate, #zero_or_more, #|

Constructor Details

This class inherits a constructor from Kaiseki::MultiParser

Instance Method Details

#delimiterObject



9
10
11
# File 'lib/parser_sequence.rb', line 9

def delimiter
	'&'
end

#predicate?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/parser_sequence.rb', line 5

def predicate?
	@expected.find {|n| !n.predicate? } ? false : true
end