Class: Danger::Suggester::File

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

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ File

Returns a new instance of File

Parameters:

  • file (GitDiff::File)

7
8
9
# File 'lib/danger/suggester/file.rb', line 7

def initialize(file)
  @file = file
end

Instance Method Details

#a_pathString

Returns:

  • (String)

12
13
14
# File 'lib/danger/suggester/file.rb', line 12

def a_path
  @file.a_path
end

#changesArray<Danger::Suggester::Change>

Returns:


17
18
19
# File 'lib/danger/suggester/file.rb', line 17

def changes
  hunks.flat_map(&:changes)
end

#suggestible?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/danger/suggester/file.rb', line 22

def suggestible?
  !renamed?
end