Sha256: dbbfa935b924041e03816f481b05f2c1e3f4e0ca33ab066f11fc46fe65ccd0ac
Contents?: true
Size: 562 Bytes
Versions: 1
Compression:
Stored size: 562 Bytes
Contents
require_relative "content_loader" require_relative "haml_loader" ## # Load a filename and return a Hash with concepts list and code list # return { concepts: [], codes: [] } module FileLoader def self.load(filename) if File.extname(filename).casecmp('.haml').zero? file_content = HamlLoader.load filename elsif File.extname(filename).casecmp('.xml').zero? file_content = File.read(filename) else puts "[ERROR] FileLoader: Format error #{filename}" raise msg end ContentLoader.load(filename, file_content) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asker-tool-2.5.9 | lib/asker/loader/file_loader.rb |