Class: Cane::UndocumentedClassViolation
- Inherits:
-
Struct
- Object
- Struct
- Cane::UndocumentedClassViolation
- Defined in:
- lib/cane/doc_check.rb
Overview
Value object used by DocCheck.
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#line ⇒ Object
Returns the value of attribute line.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name
37 38 39 |
# File 'lib/cane/doc_check.rb', line 37 def file_name @file_name end |
#line ⇒ Object
Returns the value of attribute line
37 38 39 |
# File 'lib/cane/doc_check.rb', line 37 def line @line end |
#number ⇒ Object
Returns the value of attribute number
37 38 39 |
# File 'lib/cane/doc_check.rb', line 37 def number @number end |
Instance Method Details
#columns ⇒ Object
42 43 44 |
# File 'lib/cane/doc_check.rb', line 42 def columns ["%s:%i" % [file_name, number], extract_class_name(line)] end |
#description ⇒ Object
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 |