Class: Dependabot::Workspace::ChangeAttempt

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
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.



35
36
37
38
39
40
41
# File 'lib/dependabot/workspace/change_attempt.rb', line 35

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.



12
13
14
# File 'lib/dependabot/workspace/change_attempt.rb', line 12

def diff
  @diff
end

#errorObject (readonly)

Returns the value of attribute error.



15
16
17
# File 'lib/dependabot/workspace/change_attempt.rb', line 15

def error
  @error
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#memoObject (readonly)

Returns the value of attribute memo.



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

def memo
  @memo
end

#workspaceObject (readonly)

Returns the value of attribute workspace.



24
25
26
# File 'lib/dependabot/workspace/change_attempt.rb', line 24

def workspace
  @workspace
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/dependabot/workspace/change_attempt.rb', line 49

def error?
  !error.nil?
end

#success?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/dependabot/workspace/change_attempt.rb', line 44

def success?
  error.nil?
end