Class: SGF::StrictErrorChecker
- Inherits:
-
Object
- Object
- SGF::StrictErrorChecker
- Defined in:
- lib/sgf/error_checkers.rb
Instance Method Summary collapse
Instance Method Details
#check_for_errors_before_parsing(string) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/sgf/error_checkers.rb', line 2 def check_for_errors_before_parsing string unless string[/\A\s*\(\s*;/] msg = "The first two non-whitespace characters of the string should be (;" msg << " but they were #{string[0..1]} instead." raise(SGF::MalformedDataError, msg) end end |