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-1.1.0 lib/hako/application.rb
hako-1.0.1 lib/hako/application.rb
hako-1.0.0 lib/hako/application.rb
hako-0.27.0 lib/hako/application.rb
hako-0.26.0 lib/hako/application.rb
hako-0.25.2 lib/hako/application.rb
hako-0.25.1 lib/hako/application.rb
hako-0.25.0 lib/hako/application.rb
hako-0.24.0 lib/hako/application.rb
hako-0.23.0 lib/hako/application.rb
hako-0.22.0 lib/hako/application.rb
hako-0.21.1 lib/hako/application.rb
hako-0.21.0 lib/hako/application.rb
hako-0.20.3 lib/hako/application.rb
hako-0.20.2 lib/hako/application.rb
hako-0.20.1 lib/hako/application.rb
hako-0.20.0 lib/hako/application.rb
hako-0.19.0 lib/hako/application.rb
hako-0.18.1 lib/hako/application.rb
hako-0.18.0 lib/hako/application.rb