Class: Ast::Merge::MergeIR
- Inherits:
-
Struct
- Object
- Struct
- Ast::Merge::MergeIR
- Defined in:
- lib/ast/merge.rb
Instance Attribute Summary collapse
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#diagnostics ⇒ Object
Returns the value of attribute diagnostics.
-
#node_classes ⇒ Object
Returns the value of attribute node_classes.
-
#ordered_nodes ⇒ Object
Returns the value of attribute ordered_nodes.
-
#source ⇒ Object
Returns the value of attribute source.
-
#tree_id ⇒ Object
Returns the value of attribute tree_id.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#changes ⇒ Object
Returns the value of attribute changes
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def changes @changes end |
#diagnostics ⇒ Object
Returns the value of attribute diagnostics
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def diagnostics @diagnostics end |
#node_classes ⇒ Object
Returns the value of attribute node_classes
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def node_classes @node_classes end |
#ordered_nodes ⇒ Object
Returns the value of attribute ordered_nodes
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def ordered_nodes @ordered_nodes end |
#source ⇒ Object
Returns the value of attribute source
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def source @source end |
#tree_id ⇒ Object
Returns the value of attribute tree_id
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def tree_id @tree_id end |
#version ⇒ Object
Returns the value of attribute version
177 178 179 |
# File 'lib/ast/merge.rb', line 177 def version @version end |
Instance Method Details
#to_h ⇒ Object
179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/ast/merge.rb', line 179 def to_h { version: version, tree_id: tree_id, source: source, node_classes: (node_classes || []).map(&:to_h), ordered_nodes: (ordered_nodes || []).map(&:to_h), changes: (changes || []).map(&:to_h), diagnostics: diagnostics || [] } end |