Class: Hako::Application
- Inherits:
-
Object
- Object
- Hako::Application
- Defined in:
- lib/hako/application.rb
Instance Attribute Summary collapse
- #id ⇒ String readonly
- #root_path ⇒ Pathname readonly
-
#yaml ⇒ Object
readonly
Returns the value of attribute yaml.
Instance Method Summary collapse
-
#initialize(yaml_path) ⇒ Application
constructor
A new instance of Application.
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
#id ⇒ String (readonly)
14 15 16 |
# File 'lib/hako/application.rb', line 14 def id @id end |
#root_path ⇒ Pathname (readonly)
14 |
# File 'lib/hako/application.rb', line 14 attr_reader :id, :root_path, :yaml |
#yaml ⇒ Object (readonly)
Returns the value of attribute yaml.
14 |
# File 'lib/hako/application.rb', line 14 attr_reader :id, :root_path, :yaml |