Class: Ast::Merge::PairwiseMatching

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#from_revisionObject

Returns the value of attribute from_revision

Returns:

  • (Object)

    the current value of from_revision



206
207
208
# File 'lib/ast/merge.rb', line 206

def from_revision
  @from_revision
end

#matchesObject

Returns the value of attribute matches

Returns:

  • (Object)

    the current value of matches



206
207
208
# File 'lib/ast/merge.rb', line 206

def matches
  @matches
end

#matching_idObject

Returns the value of attribute matching_id

Returns:

  • (Object)

    the current value of matching_id



206
207
208
# File 'lib/ast/merge.rb', line 206

def matching_id
  @matching_id
end

#to_revisionObject

Returns the value of attribute to_revision

Returns:

  • (Object)

    the current value of to_revision



206
207
208
# File 'lib/ast/merge.rb', line 206

def to_revision
  @to_revision
end

#unmatched_fromObject

Returns the value of attribute unmatched_from

Returns:

  • (Object)

    the current value of unmatched_from



206
207
208
# File 'lib/ast/merge.rb', line 206

def unmatched_from
  @unmatched_from
end

#unmatched_toObject

Returns the value of attribute unmatched_to

Returns:

  • (Object)

    the current value of unmatched_to



206
207
208
# File 'lib/ast/merge.rb', line 206

def unmatched_to
  @unmatched_to
end

Instance Method Details

#to_hObject



208
209
210
211
212
213
214
215
216
217
# File 'lib/ast/merge.rb', line 208

def to_h
  {
    matching_id: matching_id,
    from_revision: from_revision,
    to_revision: to_revision,
    matches: (matches || []).map(&:to_h),
    unmatched_from: unmatched_from || [],
    unmatched_to: unmatched_to || []
  }
end