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



245
246
247
# File 'lib/ast/merge.rb', line 245

def diagnostics
  @diagnostics
end

#mapping_idObject

Returns the value of attribute mapping_id

Returns:

  • (Object)

    the current value of mapping_id



245
246
247
# File 'lib/ast/merge.rb', line 245

def mapping_id
  @mapping_id
end

#node_classesObject

Returns the value of attribute node_classes

Returns:

  • (Object)

    the current value of node_classes



245
246
247
# File 'lib/ast/merge.rb', line 245

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



245
246
247
# File 'lib/ast/merge.rb', line 245

def source_matching_ids
  @source_matching_ids
end

Instance Method Details

#to_hObject



247
248
249
250
251
252
253
254
# File 'lib/ast/merge.rb', line 247

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