Skip to content

Commit

Permalink
🐛 Move some methods to be public
Browse files Browse the repository at this point in the history
This commit will move #solr_document, #current_ability, and #request to
be public methods.  Since these methods in Hyrax were not private, in
the decorator it should not be private either.

Ref:
  - https://github.com/samvera/hyrax/blob/b334e186e77691d7da8ed59ff27f091be1c2a700/app/presenters/hyrax/file_set_presenter.rb#L10
  • Loading branch information
kirkkwang committed Nov 29, 2023
1 parent 0405abd commit dbe996e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ module IiifAv
# request.base_url => hostname
# also to remove #auth_service since it was not working for now
module DisplaysContentDecorator
private
def solr_document
defined?(super) ? super : object
end

def solr_document
defined?(super) ? super : object
end
def current_ability
defined?(super) ? super : @ability
end

def current_ability
defined?(super) ? super : @ability
end
def request
Request.new(base_url: hostname)
end

Request = Struct.new(:base_url, keyword_init: true)
private

def request
Request.new(base_url: hostname)
end
Request = Struct.new(:base_url, keyword_init: true)

def image_content
return nil unless latest_file_id
Expand Down

0 comments on commit dbe996e

Please sign in to comment.