Class: Hako::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/hako/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yaml_path) ⇒ Application

Returns a new instance of Application.



16
17
18
19
20
21
# File 'lib/hako/application.rb', line 16

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

Instance Attribute Details

#idString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/hako/application.rb', line 14

def id
  @id
end

#root_pathPathname (readonly)

Returns:

  • (Pathname)


14
# File 'lib/hako/application.rb', line 14

attr_reader :id, :root_path, :yaml

#yamlObject (readonly)

Returns the value of attribute yaml.



14
# File 'lib/hako/application.rb', line 14

attr_reader :id, :root_path, :yaml