Class: Necropsy::CallSite

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(caller_id:, message:, receiver_kind:, receiver_name:, file:, line:, test:, dynamic:, metadata:, call_site_id: nil) ⇒ CallSite

Returns a new instance of CallSite.



682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/necropsy/models.rb', line 682

def initialize(caller_id:, message:, receiver_kind:, receiver_name:, file:, line:, test:, dynamic:, metadata:,
               call_site_id: nil)
  call_site_id ||= CallSiteIdentity.legacy_id(
    caller_definition_id: caller_id,
    message: message,
    receiver_kind: receiver_kind,
    receiver_name: receiver_name,
    file: file,
    line: line,
    test: test,
    dynamic: dynamic,
    metadata: 
  )
  super
end

Instance Attribute Details

#call_site_idObject (readonly)

Returns the value of attribute call_site_id

Returns:

  • (Object)

    the current value of call_site_id



647
648
649
# File 'lib/necropsy/models.rb', line 647

def call_site_id
  @call_site_id
end

#caller_idObject (readonly) Also known as: caller_definition_id

Returns the value of attribute caller_id

Returns:

  • (Object)

    the current value of caller_id



647
648
649
# File 'lib/necropsy/models.rb', line 647

def caller_id
  @caller_id
end

#dynamicObject (readonly)

Returns the value of attribute dynamic

Returns:

  • (Object)

    the current value of dynamic



647
648
649
# File 'lib/necropsy/models.rb', line 647

def dynamic
  @dynamic
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



647
648
649
# File 'lib/necropsy/models.rb', line 647

def file
  @file
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



647
648
649
# File 'lib/necropsy/models.rb', line 647

def line
  @line
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



647
648
649
# File 'lib/necropsy/models.rb', line 647

def message
  @message
end

#metadataObject (readonly)

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



647
648
649
# File 'lib/necropsy/models.rb', line 647

def 
  @metadata
end

#receiver_kindObject (readonly)

Returns the value of attribute receiver_kind

Returns:

  • (Object)

    the current value of receiver_kind



647
648
649
# File 'lib/necropsy/models.rb', line 647

def receiver_kind
  @receiver_kind
end

#receiver_nameObject (readonly)

Returns the value of attribute receiver_name

Returns:

  • (Object)

    the current value of receiver_name



647
648
649
# File 'lib/necropsy/models.rb', line 647

def receiver_name
  @receiver_name
end

#testObject (readonly)

Returns the value of attribute test

Returns:

  • (Object)

    the current value of test



647
648
649
# File 'lib/necropsy/models.rb', line 647

def test
  @test
end

Class Method Details

.data_newObject



660
# File 'lib/necropsy/models.rb', line 660

alias_method :data_new, :new

.new(*values, **attributes) ⇒ Object Also known as: []



662
663
664
# File 'lib/necropsy/models.rb', line 662

def new(*values, **attributes)
  compatible_new(*values, **attributes)
end

Instance Method Details

#to_hObject



700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
# File 'lib/necropsy/models.rb', line 700

def to_h
  {
    'call_site_id' => call_site_id,
    'caller_id' => caller_id,
    'caller_definition_id' => caller_definition_id,
    'message' => message,
    'receiver_kind' => receiver_kind.to_s,
    'receiver_name' => receiver_name,
    'file' => file,
    'line' => line,
    'test' => test,
    'dynamic' => dynamic,
    'metadata' => 
  }
end