Class: Evilution::Subject Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/subject.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, file_path:, line_number:, source:, node:) ⇒ Subject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Subject.



6
7
8
9
10
11
12
# File 'lib/evilution/subject.rb', line 6

def initialize(name:, file_path:, line_number:, source:, node:)
  @name = name
  @file_path = file_path
  @line_number = line_number
  @source = source
  @node = node
end

Instance Attribute Details

#file_pathObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'lib/evilution/subject.rb', line 4

def file_path
  @file_path
end

#line_numberObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'lib/evilution/subject.rb', line 4

def line_number
  @line_number
end

#nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'lib/evilution/subject.rb', line 4

def name
  @name
end

#nodeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'lib/evilution/subject.rb', line 4

def node
  @node
end

#sourceObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
# File 'lib/evilution/subject.rb', line 4

def source
  @source
end

Instance Method Details

#release_node!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



14
15
16
# File 'lib/evilution/subject.rb', line 14

def release_node!
  @node = nil
end

#to_sObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/evilution/subject.rb', line 18

def to_s
  "#{name} (#{file_path}:#{line_number})"
end