Class: Dependabot::Workspace::ChangeAttempt

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/workspace/change_attempt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workspace, id:, memo:, diff: nil, error: nil) ⇒ ChangeAttempt

Returns a new instance of ChangeAttempt.



9
10
11
12
13
14
15
# File 'lib/dependabot/workspace/change_attempt.rb', line 9

def initialize(workspace, id:, memo:, diff: nil, error: nil)
  @workspace = workspace
  @id = id
  @memo = memo
  @diff = diff
  @error = error
end

Instance Attribute Details

#diffObject (readonly)

Returns the value of attribute diff.



7
8
9
# File 'lib/dependabot/workspace/change_attempt.rb', line 7

def diff
  @diff
end

#errorObject (readonly)

Returns the value of attribute error.



7
8
9
# File 'lib/dependabot/workspace/change_attempt.rb', line 7

def error
  @error
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/dependabot/workspace/change_attempt.rb', line 7

def id
  @id
end

#memoObject (readonly)

Returns the value of attribute memo.



7
8
9
# File 'lib/dependabot/workspace/change_attempt.rb', line 7

def memo
  @memo
end

#workspaceObject (readonly)

Returns the value of attribute workspace.



7
8
9
# File 'lib/dependabot/workspace/change_attempt.rb', line 7

def workspace
  @workspace
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/dependabot/workspace/change_attempt.rb', line 21

def error?
  error
end

#success?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dependabot/workspace/change_attempt.rb', line 17

def success?
  error.nil?
end