Class: Cane::UndocumentedClassViolation

Inherits:
Struct
  • Object
show all
Defined in:
lib/cane/doc_check.rb

Overview

Value object used by DocCheck.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#file_nameObject

Returns the value of attribute file_name

Returns:

  • (Object)

    the current value of file_name



37
38
39
# File 'lib/cane/doc_check.rb', line 37

def file_name
  @file_name
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



37
38
39
# File 'lib/cane/doc_check.rb', line 37

def line
  @line
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



37
38
39
# File 'lib/cane/doc_check.rb', line 37

def number
  @number
end

Instance Method Details

#columnsObject



42
43
44
# File 'lib/cane/doc_check.rb', line 42

def columns
  ["%s:%i" % [file_name, number], extract_class_name(line)]
end

#descriptionObject



38
39
40
# File 'lib/cane/doc_check.rb', line 38

def description
  "Classes are not documented"
end

#extract_class_name(line) ⇒ Object



46
47
48
# File 'lib/cane/doc_check.rb', line 46

def extract_class_name(line)
  line.match(/class (\S+)/)[1]
end