Class: Saddler::Validator
- Inherits:
-
Object
- Object
- Saddler::Validator
- Defined in:
- lib/saddler/validator.rb
Class Method Summary collapse
-
.valid?(data) ⇒ Boolean
NOTE: This is easy check.
Class Method Details
.valid?(data) ⇒ Boolean
NOTE: This is easy check
4 5 6 7 8 9 10 11 |
# File 'lib/saddler/validator.rb', line 4 def self.valid?(data) REXML::Document.new(data) true rescue REXML::ParseException => e exception = InvalidXMLError.new(e.) exception.set_backtrace(e.backtrace) raise exception end |