Class: Environments::ScheduleToDeleteReviewAppsService::Result

Inherits:
Object
  • Object
show all
Defined in:
app/services/environments/schedule_to_delete_review_apps_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheduled_entries: [], unprocessable_entries: [], error_message: nil, status: nil) ⇒ Result

Returns a new instance of Result.


77
78
79
80
81
82
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 77

def initialize(scheduled_entries: [], unprocessable_entries: [], error_message: nil, status: nil)
  self.scheduled_entries = scheduled_entries
  self.unprocessable_entries = unprocessable_entries
  self.error_message = error_message
  self.status = status
end

Instance Attribute Details

#error_messageObject

Returns the value of attribute error_message.


75
76
77
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 75

def error_message
  @error_message
end

#scheduled_entriesObject

Returns the value of attribute scheduled_entries.


75
76
77
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 75

def scheduled_entries
  @scheduled_entries
end

#statusObject

Returns the value of attribute status.


75
76
77
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 75

def status
  @status
end

#unprocessable_entriesObject

Returns the value of attribute unprocessable_entries.


75
76
77
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 75

def unprocessable_entries
  @unprocessable_entries
end

Instance Method Details

#set_scheduled_entries(entries) ⇒ Object


93
94
95
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 93

def set_scheduled_entries(entries)
  self.scheduled_entries = entries
end

#set_status(status, error_message: nil) ⇒ Object


88
89
90
91
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 88

def set_status(status, error_message: nil)
  self.status = status
  self.error_message = error_message
end

#set_unprocessable_entries(entries) ⇒ Object


97
98
99
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 97

def set_unprocessable_entries(entries)
  self.unprocessable_entries = entries
end

#success?Boolean

Returns:

  • (Boolean)

84
85
86
# File 'app/services/environments/schedule_to_delete_review_apps_service.rb', line 84

def success?
  status == :ok
end