Skip to content

Commit

Permalink
document WorkflowActionInfo
Browse files Browse the repository at this point in the history
just some docs to make this easier to understand for the next person.
  • Loading branch information
tamsin johnson authored and tamsin johnson committed Sep 16, 2021
1 parent a37fcb6 commit 06a15c4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/models/hyrax/workflow_action_info.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# frozen_string_literal: true
module Hyrax
##
# A simple data object for holding a user, work and their workflow proxies
#
# this is a glorified Struct that resolves +Sipity::Enitity(work)+
# and +Sipity::Agent(user)+ for the input given, then provides readers
# for its instance variables.
#
# @example
# info = WorkflowActionInfo.new(my_work, current_user)
#
# info.agent # => #<Sipity::Agent...>
# info.entity # => #<Sipity::Entity...>
# info.work == my_work # => true
# info.user == current_user # => true
class WorkflowActionInfo
##
# @param work [Object]
# @param user [::User]
def initialize(work, user)
@work = work
@user = user
Expand Down

0 comments on commit 06a15c4

Please sign in to comment.