Sha256: 383d1b49c36c300c4462bacc3bc3bc1fdc1d5535fa7b0b3721541bc07f2a952a
Contents?: true
Size: 448 Bytes
Versions: 9
Compression:
Stored size: 448 Bytes
Contents
require 'yaml' 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 '' end end end
Version data entries
9 entries across 9 versions & 1 rubygems