DelimitedStepParser

org.specs2.specification.script.DelimitedStepParser
abstract class DelimitedStepParser[T](regex: Regex) extends StepParser[T]

A Delimited step parser uses a delimiter ({} by default) to know which string to extract from the text

Attributes

Graph
Supertypes
trait StepParser[T]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

protected def parse1(text: String): T
def withRegex(r: Regex): DelimitedStepParser[T]

use another regex with this parser

use another regex with this parser

Attributes

Concrete methods

def parse(text: String): Either[Throwable, (String, T)]

parse some text and extract some well-type value T if the original text contains delimiters to indicate the values to extract, remove them

parse some text and extract some well-type value T if the original text contains delimiters to indicate the values to extract, remove them

this is equivalent to running strip and run at the same time so it might be more efficient

Attributes

def run(text: String): Either[Throwable, T]
def strip(text: String): String

Inherited methods

def map[S](f: T => S): StepParser[S]

Attributes

Inherited from:
StepParser