Class: Taski::Env

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(root_task:) ⇒ Env

Returns a new instance of Env.

Parameters:

  • root_task (Class)

    The root task class that initiated execution



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_taskObject (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_atObject (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_directoryObject (readonly)

Returns the value of attribute working_directory.



8
9
10
# File 'lib/taski/env.rb', line 8

def working_directory
  @working_directory
end