Sha256: a7064d657d1790dc170a7b556ec49c4fc472d9456d198980c5ee0e6920b787f7
Contents?: true
Size: 485 Bytes
Versions: 1
Compression:
Stored size: 485 Bytes
Contents
require 'liquid' require 'yaml' module Frise # Provides a static parse method for reading a config from a YAML file applying the required # transformations. module Parser class << self def parse(file, symbol_table = nil) return nil unless File.file? file content = File.open(file).read content = Liquid::Template.parse(content).render symbol_table if symbol_table YAML.safe_load(content, [], [], true) || {} end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
frise-0.2.0 | lib/frise/parser.rb |