Class: Spectre::StringParsing::SpaceParser
- Inherits:
-
RangeParser
- Object
- RangeParser
- Spectre::StringParsing::SpaceParser
- Defined in:
- lib/spectre/string/primitives.rb
Overview
Matches spaces, tabs, returns and newlines. Shortcut: space_char
.
Instance Attribute Summary
Attributes included from Parser
Instance Method Summary collapse
-
#initialize ⇒ SpaceParser
constructor
A new instance of SpaceParser.
- #inspect ⇒ Object
Methods inherited from RangeParser
Methods included from Parser
#backtrack, #create_match, from_POD, #pre_skip?, #scan, #to_p
Constructor Details
#initialize ⇒ SpaceParser
Returns a new instance of SpaceParser.
304 305 306 |
# File 'lib/spectre/string/primitives.rb', line 304 def initialize super([" ", "\t", "\n", "\r"]) end |
Instance Method Details
#inspect ⇒ Object
308 309 310 |
# File 'lib/spectre/string/primitives.rb', line 308 def inspect "[space_char]" end |