class Thinreports::SectionReport::Schema::Loader
Attributes
parser[R]
Public Class Methods
new()
click to toggle source
# File lib/thinreports/section_report/schema/loader.rb, line 9 def initialize @parser = Schema::Parser.new end
Public Instance Methods
load_from_data(data)
click to toggle source
# File lib/thinreports/section_report/schema/loader.rb, line 18 def load_from_data(data) parser.parse(data) end
load_from_file(filename)
click to toggle source
# File lib/thinreports/section_report/schema/loader.rb, line 13 def load_from_file(filename) data = File.read(filename, encoding: 'UTF-8') load_from_data(data) end