Class: RDocRuboCop::RDoc::Line
- Inherits:
-
Object
- Object
- RDocRuboCop::RDoc::Line
- Defined in:
- lib/rdoc_rubocop/rdoc/line.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
- #blank? ⇒ Boolean
- #indent ⇒ Object
-
#initialize(lineno, str) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(lineno, str) ⇒ Line
Returns a new instance of Line.
10 11 12 13 |
# File 'lib/rdoc_rubocop/rdoc/line.rb', line 10 def initialize(lineno, str) @lineno = lineno @str = str end |
Instance Attribute Details
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
8 9 10 |
# File 'lib/rdoc_rubocop/rdoc/line.rb', line 8 def lineno @lineno end |
#str ⇒ Object (readonly)
Returns the value of attribute str.
8 9 10 |
# File 'lib/rdoc_rubocop/rdoc/line.rb', line 8 def str @str end |
Instance Method Details
#blank? ⇒ Boolean
15 16 17 |
# File 'lib/rdoc_rubocop/rdoc/line.rb', line 15 def blank? /^ *$/.match?(@str) end |
#indent ⇒ Object
19 20 21 |
# File 'lib/rdoc_rubocop/rdoc/line.rb', line 19 def indent @str..indent end |