Class: Spectre::StringParsing::BlankParser

Inherits:
RangeParser
  • Object
show all
Defined in:
lib/spectre/string/primitives.rb

Overview

Matches spaces and tabs. Shortcut: blank_char.

Instance Attribute Summary

Attributes included from Parser

#node

Instance Method Summary collapse

Methods inherited from RangeParser

#negation, #scan

Methods included from Parser

#backtrack, #create_match, from_POD, #pre_skip?, #scan, #to_p

Constructor Details

#initializeBlankParser

Returns a new instance of BlankParser.



168
169
170
# File 'lib/spectre/string/primitives.rb', line 168

def initialize
    super([" ", "\t"])
end

Instance Method Details

#inspectObject



172
173
174
# File 'lib/spectre/string/primitives.rb', line 172

def inspect
    "[blank_char]"
end