Class: DParse::Parsers::WhitespaceChar

Inherits:
DParse::Parser show all
Defined in:
lib/d-parse/parsers/highlevel/whitespace_char.rb

Constant Summary collapse

WS =
[' ', "\t"].freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DParse::Parser

#apply, #bind, #capture, #compact, #expectation_message, #first, #flatten, #ignore, #inspect, #map, #match?, #read, #second, #select_even, #select_odd, #to_s

Constructor Details

#initializeWhitespaceChar

Returns a new instance of WhitespaceChar.

Raises:

  • (ArgumentError)


10
11
12
# File 'lib/d-parse/parsers/highlevel/whitespace_char.rb', line 10

def initialize(*)
  raise ArgumentError, "#{self.class} is not supposed to be initialized"
end

Class Method Details

.newObject



6
7
8
# File 'lib/d-parse/parsers/highlevel/whitespace_char.rb', line 6

def self.new
  DParse::Parsers::CharIn.new(WS)
end