Class: Ast::Merge::SourceRender::Result
- Inherits:
-
Object
- Object
- Ast::Merge::SourceRender::Result
- Defined in:
- lib/ast/merge/source_render/result.rb,
sig/ast/merge.rbs
Overview
Immutable output and provenance from a render plan.
Instance Attribute Summary collapse
-
#conflicts ⇒ Array[Hash[untyped, untyped]]
readonly
Returns the value of attribute conflicts.
-
#content ⇒ String
readonly
Returns the value of attribute content.
-
#line_records ⇒ Array[Hash[untyped, untyped]]
readonly
Returns the value of attribute line_records.
-
#synthesized_fragments ⇒ Array[Hash[untyped, untyped]]
readonly
Returns the value of attribute synthesized_fragments.
-
#verification_input ⇒ Hash[untyped, untyped]
readonly
Returns the value of attribute verification_input.
Instance Method Summary collapse
- #conflicted? ⇒ Boolean
-
#initialize(content:, line_records:, synthesized_fragments:, conflicts:, verification_input:) ⇒ Result
constructor
A new instance of Result.
- #to_h ⇒ Hash[Symbol, untyped]
Constructor Details
#initialize(content:, line_records:, synthesized_fragments:, conflicts:, verification_input:) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 15 16 17 |
# File 'lib/ast/merge/source_render/result.rb', line 10 def initialize(content:, line_records:, synthesized_fragments:, conflicts:, verification_input:) @content = content.freeze @line_records = line_records.freeze @synthesized_fragments = synthesized_fragments.freeze @conflicts = conflicts.freeze @verification_input = verification_input.freeze freeze end |
Instance Attribute Details
#conflicts ⇒ Array[Hash[untyped, untyped]] (readonly)
Returns the value of attribute conflicts.
8 9 10 |
# File 'lib/ast/merge/source_render/result.rb', line 8 def conflicts @conflicts end |
#content ⇒ String (readonly)
Returns the value of attribute content.
8 9 10 |
# File 'lib/ast/merge/source_render/result.rb', line 8 def content @content end |
#line_records ⇒ Array[Hash[untyped, untyped]] (readonly)
Returns the value of attribute line_records.
8 9 10 |
# File 'lib/ast/merge/source_render/result.rb', line 8 def line_records @line_records end |
#synthesized_fragments ⇒ Array[Hash[untyped, untyped]] (readonly)
Returns the value of attribute synthesized_fragments.
8 9 10 |
# File 'lib/ast/merge/source_render/result.rb', line 8 def synthesized_fragments @synthesized_fragments end |
#verification_input ⇒ Hash[untyped, untyped] (readonly)
Returns the value of attribute verification_input.
8 9 10 |
# File 'lib/ast/merge/source_render/result.rb', line 8 def verification_input @verification_input end |
Instance Method Details
#conflicted? ⇒ Boolean
19 20 21 |
# File 'lib/ast/merge/source_render/result.rb', line 19 def conflicted? !conflicts.empty? end |
#to_h ⇒ Hash[Symbol, untyped]
23 24 25 26 27 28 29 30 31 |
# File 'lib/ast/merge/source_render/result.rb', line 23 def to_h { content: content, line_records: line_records, synthesized_fragments: synthesized_fragments, conflicts: conflicts, verification_input: verification_input } end |