Class: Pageflow::OverviewButton
- Inherits:
-
Object
- Object
- Pageflow::OverviewButton
- Defined in:
- app/models/pageflow/overview_button.rb
Instance Attribute Summary collapse
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #enabled_value ⇒ Object
-
#initialize(revision) ⇒ OverviewButton
constructor
A new instance of OverviewButton.
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
#revision ⇒ Object (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
9 10 11 12 |
# File 'app/models/pageflow/overview_button.rb', line 9 def enabled? revision.configuration['overview_button_enabled'] && revision.theme. end |
#enabled_value ⇒ Object
14 15 16 |
# File 'app/models/pageflow/overview_button.rb', line 14 def enabled_value revision.configuration['overview_button_enabled'] end |