Sha256: 659b1f0f60a93b7fafaa986500c13c8c97ac24f0060140b52f255959b333c3af

Contents?: true

Size: 508 Bytes

Versions: 20

Compression:

Stored size: 508 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

20 entries across 20 versions & 1 rubygems

Version Path
hako-1.9.0 lib/hako/application.rb
hako-1.8.4 lib/hako/application.rb
hako-1.8.3 lib/hako/application.rb
hako-1.8.2 lib/hako/application.rb
hako-1.8.1 lib/hako/application.rb
hako-1.8.0 lib/hako/application.rb
hako-1.7.0 lib/hako/application.rb
hako-1.6.2 lib/hako/application.rb
hako-1.6.1 lib/hako/application.rb
hako-1.6.0 lib/hako/application.rb
hako-1.5.2 lib/hako/application.rb
hako-1.5.1 lib/hako/application.rb
hako-1.5.0 lib/hako/application.rb
hako-1.4.0 lib/hako/application.rb
hako-1.3.3 lib/hako/application.rb
hako-1.3.2 lib/hako/application.rb
hako-1.3.1 lib/hako/application.rb
hako-1.3.0 lib/hako/application.rb
hako-1.2.1 lib/hako/application.rb
hako-1.2.0 lib/hako/application.rb