Sha256: c8f2d4a530f3a1bad4328ebae0a1056e1783e1ddc8b61e4f387f203ddb9b95ee

Contents?: true

Size: 507 Bytes

Versions: 25

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true
require 'hako/yaml_loader'
require 'pathname'

module Hako
  class Application
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] root_path
    #   @return [Pathname]
    # @!attribute [r] yaml
    #   @return [Hash]
    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 = YamlLoader.new.load(path)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hako-0.17.2 lib/hako/application.rb
hako-0.17.1 lib/hako/application.rb
hako-0.17.0 lib/hako/application.rb
hako-0.16.0 lib/hako/application.rb
hako-0.15.3 lib/hako/application.rb