Class: Hashira::Complexity::MethodScore

Inherits:
Data
  • Object
show all
Defined in:
lib/hashira/complexity/method_score.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#callsObject (readonly)

Returns the value of attribute calls

Returns:

  • (Object)

    the current value of calls



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def calls
  @calls
end

#cognitiveObject (readonly)

Returns the value of attribute cognitive

Returns:

  • (Object)

    the current value of cognitive



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def cognitive
  @cognitive
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def file
  @file
end

#incrementsObject (readonly)

Returns the value of attribute increments

Returns:

  • (Object)

    the current value of increments



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def increments
  @increments
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def line
  @line
end

#subjectObject (readonly)

Returns the value of attribute subject

Returns:

  • (Object)

    the current value of subject



7
8
9
# File 'lib/hashira/complexity/method_score.rb', line 7

def subject
  @subject
end

Instance Method Details

#cellsObject



10
# File 'lib/hashira/complexity/method_score.rb', line 10

def cells = [subject, cognitive, calls, "#{file}:#{line}"]

#to_hObject



8
# File 'lib/hashira/complexity/method_score.rb', line 8

def to_h = { subject:, file:, line:, cognitive:, calls: }