require 'yaml' require 'pathname' module Jarl class JarlFile attr_reader :path, :name def initialize(path) @path = Pathname.new(path).expand_path @name = @path.basename('.jarl') end def applications @applications ||= load_applications end private def load_applications YAML.load(File.read(path)).map do |app_name, params| Application.new(name, app_name, params) end end end # class JarlFile end # module Jarl