class Trainworks::FileParser::InvalidRailroadInputFormat

When parsing the input file, format of the route is not correct InvalidRailroadInputFormat will be raised

Public Class Methods

new(route_string) click to toggle source

@param [Object] route_string - must respond to `#to_s` @return [InvalidRailroadInputFormat]

# File lib/trainworks/file_parser/invalid_railroad_input_format.rb, line 8
def initialize(route_string)
  @route_string = route_string
end

Public Instance Methods

to_s() click to toggle source

Converts the exception into string

# File lib/trainworks/file_parser/invalid_railroad_input_format.rb, line 13
def to_s
  "'#{@route_string}' is not of the form LetterLetterNumber. E.g. AB10"
end