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) ⇒ OverviewButton

Returns a new instance of OverviewButton.



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

def initialize(revision)
  @revision = revision
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

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


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

def enabled?
  revision.configuration['overview_button_enabled'] &&
    revision.theme.has_overview_button?
end

#enabled_valueObject



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

def enabled_value
  revision.configuration['overview_button_enabled']
end