Class: Comment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file:, line:, text:) ⇒ Comment

Returns a new instance of Comment.



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

def initialize(file:, line:, text:)
  self.file = file
  self.line = line
  self.text = text
end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



2
3
4
# File 'lib/comment.rb', line 2

def file
  @file
end

#lineObject

Returns the value of attribute line.



2
3
4
# File 'lib/comment.rb', line 2

def line
  @line
end

#textObject

Returns the value of attribute text.



2
3
4
# File 'lib/comment.rb', line 2

def text
  @text
end