module Drudge::Parsers::ParseResults::ParseResult
Identifies a parse result. It can be a Success or NotSuccess
Public Instance Methods
+(other)
click to toggle source
Combines this result with the other by applying the ‘+’ operator on the underlying ParseValue
takes care of failure / success combinatorics are observed
# File lib/drudge/parsers/parse_results.rb, line 54 def +(other) self.flat_map do |res| other.map do |other_res| res + other_res end end end
flat_map()
click to toggle source
monadic bind (or flat_map
) of two sequential results
# File lib/drudge/parsers/parse_results.rb, line 47 def flat_map; end
flat_map_with_next(&parser_producer)
click to toggle source
# File lib/drudge/parsers/parse_results.rb, line 49 def flat_map_with_next(&parser_producer); end
map()
click to toggle source
applies the provided block to the containing ParseValue
returns a new ParseResult
containing the modified value
# File lib/drudge/parsers/parse_results.rb, line 41 def map ; end
map_in_parse_value()
click to toggle source
applies the provied block to the contained parse value
# File lib/drudge/parsers/parse_results.rb, line 44 def map_in_parse_value; end
success?()
click to toggle source
returns true if the ParseResult
was successful
# File lib/drudge/parsers/parse_results.rb, line 63 def success?; end