lib/hako/application.rb in hako-0.6.1 vs lib/hako/application.rb in hako-0.7.0

- old
+ new

@@ -1,22 +1,14 @@ -require 'yaml' +require 'hako/yaml_loader' module Hako class Application attr_reader :id, :root_path, :yaml def initialize(yaml_path) path = Pathname.new(yaml_path) @id = path.basename.sub_ext('').to_s @root_path = path.parent - @yaml = YAML.load(load_default_yaml(@root_path) + path.read) - end - - private - - def load_default_yaml(root_path) - root_path.join('default.yml').read - rescue Errno::ENOENT - '' + @yaml = YamlLoader.load(path) end end end