Class: Ast::Merge::ClassMappingReport

Inherits:
Struct
  • Object
show all
Defined in:
lib/ast/merge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#diagnosticsObject

Returns the value of attribute diagnostics

Returns:

  • (Object)

    the current value of diagnostics



267
268
269
# File 'lib/ast/merge.rb', line 267

def diagnostics
  @diagnostics
end

#mapping_idObject

Returns the value of attribute mapping_id

Returns:

  • (Object)

    the current value of mapping_id



267
268
269
# File 'lib/ast/merge.rb', line 267

def mapping_id
  @mapping_id
end

#node_classesObject

Returns the value of attribute node_classes

Returns:

  • (Object)

    the current value of node_classes



267
268
269
# File 'lib/ast/merge.rb', line 267

def node_classes
  @node_classes
end

#source_matching_idsObject

Returns the value of attribute source_matching_ids

Returns:

  • (Object)

    the current value of source_matching_ids



267
268
269
# File 'lib/ast/merge.rb', line 267

def source_matching_ids
  @source_matching_ids
end

Instance Method Details

#to_hObject



269
270
271
272
273
274
275
276
# File 'lib/ast/merge.rb', line 269

def to_h
  {
    mapping_id: mapping_id,
    source_matching_ids: source_matching_ids || [],
    node_classes: (node_classes || []).map(&:to_h),
    diagnostics: (diagnostics || []).map(&:to_h)
  }
end