Module: SAFT::V2
- Defined in:
- lib/saft/v2.rb,
lib/saft/v2/html.rb,
lib/saft/v2/parse.rb,
lib/saft/v2/scribe.rb,
lib/saft/v2/xsd_validate.rb
Defined Under Namespace
Modules: HTML, Norway, Parse, Types
Classes: Scribe, XsdValidate
Class Method Summary
collapse
Class Method Details
.parse(xml_content) ⇒ Object
11
12
13
14
15
|
# File 'lib/saft/v2.rb', line 11
def self.parse(xml_content)
doc = Nokogiri::XML(xml_content)
doc.remove_namespaces!
Parse.call(doc).then { Types::AuditFile.call(_1) }
end
|
.scribe(audit_file) ⇒ Object
.to_html(audit_file) ⇒ Object
31
32
33
34
35
|
# File 'lib/saft/v2.rb', line 31
def self.to_html(audit_file)
raise ArgumentError unless audit_file.is_a?(Types::AuditFile)
HTML.render(audit_file)
end
|
.validate(xml_content) ⇒ Object
27
28
29
|
# File 'lib/saft/v2.rb', line 27
def self.validate(xml_content)
XsdValidate.new(xml_content)
end
|