Class: Hyrax::HomepagePresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/hyrax/homepage_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(current_ability) ⇒ HomepagePresenter

Returns a new instance of HomepagePresenter.



5
6
7
# File 'app/presenters/hyrax/homepage_presenter.rb', line 5

def initialize(current_ability)
  @current_ability = current_ability
end

Instance Attribute Details

#current_abilityObject (readonly)

Returns the value of attribute current_ability.



3
4
5
# File 'app/presenters/hyrax/homepage_presenter.rb', line 3

def current_ability
  @current_ability
end

Instance Method Details

#display_share_button?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/presenters/hyrax/homepage_presenter.rb', line 9

def display_share_button?
  Hyrax.config.always_display_share_button? || current_ability.can_create_any_work?
end