class Rutema::Parsers::SpecificationParser
Base class that bombs out when used.
Derive your parser class from this class and implement parse_specification
and validate_configuration
Attributes
configuration[R]
Public Class Methods
new(configuration)
click to toggle source
# File lib/rutema/core/parser.rb, line 11 def initialize configuration @configuration=configuration @configuration||={} validate_configuration end
Public Instance Methods
parse_setup(param)
click to toggle source
parses the setup script. By default calls parse_specification
# File lib/rutema/core/parser.rb, line 21 def parse_setup param parse_specification(param) end
parse_specification(param)
click to toggle source
parses a specification
# File lib/rutema/core/parser.rb, line 17 def parse_specification param raise ParserError,"not implemented. You should derive a parser implementation from SpecificationParser!" end
parse_teardown(param)
click to toggle source
parses the teardown script. By default calls parse_specification
# File lib/rutema/core/parser.rb, line 25 def parse_teardown param parse_specification(param) end
validate_configuration()
click to toggle source
The parser stores it’s configuration in @configuration
To avoid validating the configuration in element_* methods repeatedly, do all configuration validation here
# File lib/rutema/core/parser.rb, line 31 def validate_configuration end