Class: Danger::Suggester::Suggestion

Inherits:
Object
  • Object
show all
Defined in:
lib/danger/suggester/suggestion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, line:, path:) ⇒ Suggestion

Returns a new instance of Suggestion

Parameters:

  • content (String)
  • line (Integer)
  • path (String)

13
14
15
16
17
# File 'lib/danger/suggester/suggestion.rb', line 13

def initialize(content:, line:, path:)
  @content = content
  @line = line
  @path = path
end

Instance Attribute Details

#lineInteger (readonly)

Returns:

  • (Integer)

5
6
7
# File 'lib/danger/suggester/suggestion.rb', line 5

def line
  @line
end

#pathObject (readonly)

Parameters:

  • (String)

8
9
10
# File 'lib/danger/suggester/suggestion.rb', line 8

def path
  @path
end

Instance Method Details

#messageString

Returns:

  • (String)

20
21
22
# File 'lib/danger/suggester/suggestion.rb', line 20

def message
  "```suggestion\n#{@content}\n```"
end