Class: Hyrax::Forms::FileManagerForm

Inherits:
Object
  • Object
show all
Includes:
HydraEditor::Form
Defined in:
app/forms/hyrax/forms/file_manager_form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work, ability, member_factory: MemberPresenterFactory) ⇒ FileManagerForm

Returns a new instance of FileManagerForm.

Parameters:

  • work (Object)

    a work with members

  • ability (::Ability)

    the current ability

  • member_factory (Class) (defaults to: MemberPresenterFactory)

    the member_presenter factory object to use when constructing presenters


15
16
17
18
19
20
# File 'app/forms/hyrax/forms/file_manager_form.rb', line 15

def initialize(work, ability, member_factory: MemberPresenterFactory)
  super(work)
  @current_ability = ability
  @request = nil
  @member_factory = member_factory
end

Instance Attribute Details

#current_abilityObject (readonly)

Returns the value of attribute current_ability


8
9
10
# File 'app/forms/hyrax/forms/file_manager_form.rb', line 8

def current_ability
  @current_ability
end

#requestObject (readonly)

Returns the value of attribute request


8
9
10
# File 'app/forms/hyrax/forms/file_manager_form.rb', line 8

def request
  @request
end

Instance Method Details

#versionObject


22
23
24
# File 'app/forms/hyrax/forms/file_manager_form.rb', line 22

def version
  model.etag
end