Class: Rundoc::Context::Execution

Inherits:
Object
  • Object
show all
Defined in:
lib/rundoc/context/execution.rb

Overview

Holds configuration for the currently executing script

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_path:, output_dir:, screenshots_dirname:) ⇒ Execution

Returns a new instance of Execution.



14
15
16
17
18
19
# File 'lib/rundoc/context/execution.rb', line 14

def initialize(source_path:, output_dir:, screenshots_dirname:)
  @source_path = Pathname(source_path).expand_path
  @source_dir = @source_path.parent
  @output_dir = Pathname(output_dir).expand_path
  @screenshots_dir = @output_dir.join(screenshots_dirname).expand_path
end

Instance Attribute Details

#output_dirObject (readonly)

The path to the source file



6
7
8
# File 'lib/rundoc/context/execution.rb', line 6

def output_dir
  @output_dir
end

#screenshots_dirObject (readonly)

The path to the source file



6
7
8
# File 'lib/rundoc/context/execution.rb', line 6

def screenshots_dir
  @screenshots_dir
end

#source_dirObject (readonly)

The path to the source file



6
7
8
# File 'lib/rundoc/context/execution.rb', line 6

def source_dir
  @source_dir
end

#source_pathObject (readonly)

The path to the source file



6
7
8
# File 'lib/rundoc/context/execution.rb', line 6

def source_path
  @source_path
end