class Jekyll::Drivers::YamlDriver
Public Class Methods
new(options)
click to toggle source
# File lib/jekyll/drivers/yaml_driver.rb, line 6 def initialize(options) @path = options['path'] if !@path raise FatalException.new "'path' must be specified for yaml data source: #{options['name']}." end if !File.exists?(@path) raise FatalException.new "the file '#{@path}' doesn't exist for data source '#{options['name']}'" end end
Public Instance Methods
load()
click to toggle source
# File lib/jekyll/drivers/yaml_driver.rb, line 18 def load YAML.safe_load_file(@path) end