Class: GemfileSorter::Line::Comment

Inherits:
Object
  • Object
show all
Defined in:
lib/gemfile_sorter/line/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lineObject

Returns the value of attribute line.



4
5
6
# File 'lib/gemfile_sorter/line/comment.rb', line 4

def line
  @line
end

#line_numberObject

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

#commentsObject



11
# File 'lib/gemfile_sorter/line/comment.rb', line 11

def comments = [self]

#to_sObject



13
# File 'lib/gemfile_sorter/line/comment.rb', line 13

def to_s = line