Class: Necropsy::Node
- Inherits:
-
Data
- Object
- Data
- Necropsy::Node
- Defined in:
- lib/necropsy/models.rb
Instance Attribute Summary collapse
-
#defined_via ⇒ Object
readonly
Returns the value of attribute defined_via.
-
#end_line ⇒ Object
readonly
Returns the value of attribute end_line.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
-
#visibility ⇒ Object
readonly
Returns the value of attribute visibility.
Instance Method Summary collapse
Instance Attribute Details
#defined_via ⇒ Object (readonly)
Returns the value of attribute defined_via
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def defined_via @defined_via end |
#end_line ⇒ Object (readonly)
Returns the value of attribute end_line
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def end_line @end_line end |
#file ⇒ Object (readonly)
Returns the value of attribute file
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def file @file end |
#id ⇒ Object (readonly)
Returns the value of attribute id
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def id @id end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def kind @kind end |
#line ⇒ Object (readonly)
Returns the value of attribute line
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def owner @owner end |
#test ⇒ Object (readonly)
Returns the value of attribute test
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def test @test end |
#visibility ⇒ Object (readonly)
Returns the value of attribute visibility
13 14 15 |
# File 'lib/necropsy/models.rb', line 13 def visibility @visibility end |
Instance Method Details
#fingerprint(classification) ⇒ Object
18 19 20 |
# File 'lib/necropsy/models.rb', line 18 def fingerprint(classification) Digest::SHA256.hexdigest("#{classification}:#{id}") end |
#method? ⇒ Boolean
14 15 16 |
# File 'lib/necropsy/models.rb', line 14 def method? kind != :block_entry end |
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/necropsy/models.rb', line 22 def to_h { 'id' => id, 'kind' => kind.to_s, 'file' => file, 'line' => line, 'end_line' => end_line, 'defined_via' => defined_via.to_s, 'owner' => owner, 'name' => name, 'test' => test, 'visibility' => visibility.to_s } end |