Class: Necropsy::Edge

Inherits:
Data
  • Object
show all
Defined in:
lib/necropsy/models.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#callee_idObject (readonly)

Returns the value of attribute callee_id

Returns:

  • (Object)

    the current value of callee_id



507
508
509
# File 'lib/necropsy/models.rb', line 507

def callee_id
  @callee_id
end

#caller_idObject (readonly)

Returns the value of attribute caller_id

Returns:

  • (Object)

    the current value of caller_id



507
508
509
# File 'lib/necropsy/models.rb', line 507

def caller_id
  @caller_id
end

#evidencesObject (readonly)

Returns the value of attribute evidences

Returns:

  • (Object)

    the current value of evidences



507
508
509
# File 'lib/necropsy/models.rb', line 507

def evidences
  @evidences
end

Instance Method Details

#to_hObject



508
509
510
511
512
513
514
515
# File 'lib/necropsy/models.rb', line 508

def to_h
  {
    'caller_id' => caller_id,
    'callee_id' => callee_id,
    'evidence_ids' => evidences.filter_map(&:evidence_id).sort,
    'evidences' => evidences.map(&:to_h)
  }
end