Class: CurationConcerns::Workflow::StatusListService

Inherits:
Object
  • Object
show all
Defined in:
app/services/curation_concerns/workflow/status_list_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ StatusListService

Returns a new instance of StatusListService.

Parameters:



5
6
7
# File 'app/services/curation_concerns/workflow/status_list_service.rb', line 5

def initialize(user)
  @user = user
end

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



9
10
11
# File 'app/services/curation_concerns/workflow/status_list_service.rb', line 9

def user
  @user
end

Instance Method Details

#eachArray<StatusRow>

TODO: We will want to paginate this

Returns:

  • (Array<StatusRow>)

    a list of results that the given user can take action on.



13
14
15
16
17
18
# File 'app/services/curation_concerns/workflow/status_list_service.rb', line 13

def each
  return enum_for(:each) unless block_given?
  solr_documents.each do |doc|
    yield doc
  end
end