Class: CleoQualityReview::Runner::AnalysisContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/cleo_quality_review/runner.rb

Overview

Grouped values resolved at the start of an analysis run

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_refObject

Returns the value of attribute base_ref

Returns:

  • (Object)

    the current value of base_ref



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def base_ref
  @base_ref
end

#changesObject

Returns the value of attribute changes

Returns:

  • (Object)

    the current value of changes



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def changes
  @changes
end

#check_classesObject

Returns the value of attribute check_classes

Returns:

  • (Object)

    the current value of check_classes



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def check_classes
  @check_classes
end

#review_idObject

Returns the value of attribute review_id

Returns:

  • (Object)

    the current value of review_id



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def review_id
  @review_id
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def target
  @target
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



24
25
26
# File 'lib/cleo_quality_review/runner.rb', line 24

def timestamp
  @timestamp
end

Instance Method Details

#run_attributesHash

Returns run construction attributes derived from this context.

Returns:

  • (Hash)

    run construction attributes derived from this context



27
28
29
30
31
32
33
34
35
36
# File 'lib/cleo_quality_review/runner.rb', line 27

def run_attributes
  {
    timestamp: timestamp,
    base_ref: base_ref,
    review_id: review_id,
    checks: check_classes.map(&:check_name),
    target_files: target.files,
    ruby_files: target.ruby_files,
  }
end