Sha256: 75704654a867f6888e65a6a6975c157e175e24d9e30c5febfab93d2938d68578
Contents?: true
Size: 844 Bytes
Versions: 19
Compression:
Stored size: 844 Bytes
Contents
# 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 @entity = Sipity::Entity(work) @agent = Sipity::Agent(user) end attr_reader :entity, :agent, :user, :work end end
Version data entries
19 entries across 19 versions & 1 rubygems