Class: GemfileSorter::Line::Comment
- Inherits:
-
Object
- Object
- GemfileSorter::Line::Comment
- Defined in:
- lib/gemfile_sorter/line/comment.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
-
#line_number ⇒ Object
Returns the value of attribute line_number.
Instance Method Summary collapse
- #comments ⇒ Object
-
#initialize(line: nil, line_number: nil) ⇒ Comment
constructor
A new instance of Comment.
- #to_s ⇒ Object
Constructor Details
#initialize(line: nil, line_number: nil) ⇒ Comment
Returns a new instance of Comment.
6 7 8 9 |
# File 'lib/gemfile_sorter/line/comment.rb', line 6 def initialize(line: nil, line_number: nil) @line = line @line_number = line_number end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
4 5 6 |
# File 'lib/gemfile_sorter/line/comment.rb', line 4 def line @line end |
#line_number ⇒ Object
Returns the value of attribute line_number.
4 5 6 |
# File 'lib/gemfile_sorter/line/comment.rb', line 4 def line_number @line_number end |
Instance Method Details
#comments ⇒ Object
11 |
# File 'lib/gemfile_sorter/line/comment.rb', line 11 def comments = [self] |
#to_s ⇒ Object
13 |
# File 'lib/gemfile_sorter/line/comment.rb', line 13 def to_s = line |