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.
-
#theming ⇒ Object
readonly
Returns the value of attribute theming.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #enabled_value ⇒ Object
-
#initialize(revision, theming) ⇒ OverviewButton
constructor
A new instance of OverviewButton.
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
#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 |
#theming ⇒ Object (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
10 11 12 13 |
# File 'app/models/pageflow/overview_button.rb', line 10 def enabled? revision. && theming.theme. end |
#enabled_value ⇒ Object
15 16 17 |
# File 'app/models/pageflow/overview_button.rb', line 15 def enabled_value revision. end |