Class: Pageflow::OverviewButton

Inherits:
Object
  • Object
show all
Defined in:
app/models/pageflow/overview_button.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(revision, theming) ⇒ OverviewButton

Returns a new instance of OverviewButton.



5
6
7
8
# File 'app/models/pageflow/overview_button.rb', line 5

def initialize(revision, theming)
  @revision = revision
  @theming = theming
end

Instance Attribute Details

#revisionObject (readonly)

Returns the value of attribute revision.



3
4
5
# File 'app/models/pageflow/overview_button.rb', line 3

def revision
  @revision
end

#themingObject (readonly)

Returns the value of attribute theming.



3
4
5
# File 'app/models/pageflow/overview_button.rb', line 3

def theming
  @theming
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'app/models/pageflow/overview_button.rb', line 10

def enabled?
  revision.overview_button_enabled? &&
    theming.theme.has_overview_button?
end

#enabled_valueObject



15
16
17
# File 'app/models/pageflow/overview_button.rb', line 15

def enabled_value
  revision.overview_button_enabled?
end