Class: Ryac::Pipeline::StageContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/ryac/pipeline/stage.rb,
sig/ryac/pipeline/stage.rbs

Overview

Everything a stage sees while collecting: the current text, its parse, and — inside an analysis batch — the one AnalysisResult. aliases and preamble accumulate finish contributions in list order.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#aliases ⇒ Object

Returns the value of attribute aliases

Returns:

  • (Object) —

    the current value of aliases



12
13
14
# File 'lib/ryac/pipeline/stage.rb', line 12

def aliases
  @aliases
end

#analysis ⇒ Object

Returns the value of attribute analysis

Returns:

  • (Object) —

    the current value of analysis



12
13
14
# File 'lib/ryac/pipeline/stage.rb', line 12

def analysis
  @analysis
end

#ast ⇒ Object

Returns the value of attribute ast

Returns:

  • (Object) —

    the current value of ast



12
13
14
# File 'lib/ryac/pipeline/stage.rb', line 12

def ast
  @ast
end

#preamble ⇒ Object

Returns the value of attribute preamble

Returns:

  • (Object) —

    the current value of preamble



12
13
14
# File 'lib/ryac/pipeline/stage.rb', line 12

def preamble
  @preamble
end

#source ⇒ Object

Returns the value of attribute source

Returns:

  • (Object) —

    the current value of source



12
13
14
# File 'lib/ryac/pipeline/stage.rb', line 12

def source
  @source
end

Class Method Details

.new ⇒ StageContext

Parameters:

  • source (String)
  • ast (Prism::ProgramNode)
  • analysis (AnalysisResult, nil)
  • aliases (String)
  • preamble (String)

Returns:



10
# File 'sig/ryac/pipeline/stage.rbs', line 10

def self.new: (String source, Prism::ProgramNode ast, AnalysisResult? analysis, String aliases, String preamble) -> StageContext