Class: Taski::Env
- Inherits:
-
Object
- Object
- Taski::Env
- Defined in:
- lib/taski/env.rb
Overview
Runtime execution environment information. Holds system-managed metadata that is set automatically during task execution. Env is immutable after creation.
Instance Attribute Summary collapse
-
#root_task ⇒ Object
readonly
Returns the value of attribute root_task.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#working_directory ⇒ Object
readonly
Returns the value of attribute working_directory.
Instance Method Summary collapse
-
#initialize(root_task:) ⇒ Env
constructor
A new instance of Env.
Constructor Details
#initialize(root_task:) ⇒ Env
Returns a new instance of Env.
11 12 13 14 15 |
# File 'lib/taski/env.rb', line 11 def initialize(root_task:) @root_task = root_task @started_at = Time.now @working_directory = Dir.pwd end |
Instance Attribute Details
#root_task ⇒ Object (readonly)
Returns the value of attribute root_task.
8 9 10 |
# File 'lib/taski/env.rb', line 8 def root_task @root_task end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
8 9 10 |
# File 'lib/taski/env.rb', line 8 def started_at @started_at end |
#working_directory ⇒ Object (readonly)
Returns the value of attribute working_directory.
8 9 10 |
# File 'lib/taski/env.rb', line 8 def working_directory @working_directory end |