Sha256: fb88bca97f7817159c32c09e30a48b41abe5eac8af6cec7d0ab654d1fd643820

Contents?: true

Size: 488 Bytes

Versions: 5

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true
require 'hako/yaml_loader'

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

5 entries across 5 versions & 1 rubygems

Version Path
hako-0.15.2 lib/hako/application.rb
hako-0.15.1 lib/hako/application.rb
hako-0.15.0 lib/hako/application.rb
hako-0.14.1 lib/hako/application.rb
hako-0.14.0 lib/hako/application.rb