Class: Thinreports::SectionReport::Schema::Loader
- Inherits:
-
Object
- Object
- Thinreports::SectionReport::Schema::Loader
- Defined in:
- lib/thinreports/section_report/schema/loader.rb
Instance Method Summary collapse
-
#initialize ⇒ Loader
constructor
A new instance of Loader.
- #load_from_data(data) ⇒ Object
- #load_from_file(filename) ⇒ Object
Constructor Details
Instance Method Details
#load_from_data(data) ⇒ Object
18 19 20 |
# File 'lib/thinreports/section_report/schema/loader.rb', line 18 def load_from_data(data) parser.parse(data) end |
#load_from_file(filename) ⇒ Object
13 14 15 16 |
# 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 |