Class: Pageflow::EntryAtRevision
- Inherits:
-
Object
- Object
- Pageflow::EntryAtRevision
show all
- Includes:
- ActiveModel::Conversion
- Defined in:
- app/models/pageflow/entry_at_revision.rb
Overview
A simplified view of an entry at a given revision. Hides the revision concept and makes revision attributes available along with entry attributes.
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(entry, revision, theme: nil) ⇒ EntryAtRevision
Returns a new instance of EntryAtRevision.
10
11
12
13
14
|
# File 'app/models/pageflow/entry_at_revision.rb', line 10
def initialize(entry, revision, theme: nil)
@entry = entry
@revision = revision
@theme = theme
end
|
Instance Attribute Details
#entry ⇒ Object
Returns the value of attribute entry.
8
9
10
|
# File 'app/models/pageflow/entry_at_revision.rb', line 8
def entry
@entry
end
|
#revision ⇒ Object
Returns the value of attribute revision.
8
9
10
|
# File 'app/models/pageflow/entry_at_revision.rb', line 8
def revision
@revision
end
|
Instance Method Details
#emphasize_chapter_beginning ⇒ Object
63
64
65
|
# File 'app/models/pageflow/entry_at_revision.rb', line 63
def emphasize_chapter_beginning
revision.configuration['emphasize_chapter_beginning']
end
|
#emphasize_new_pages ⇒ Object
67
68
69
|
# File 'app/models/pageflow/entry_at_revision.rb', line 67
def emphasize_new_pages
revision.configuration['emphasize_new_pages']
end
|
51
52
53
|
# File 'app/models/pageflow/entry_at_revision.rb', line 51
def home_button
HomeButton.new(revision, site)
end
|
#manual_start ⇒ Object
59
60
61
|
# File 'app/models/pageflow/entry_at_revision.rb', line 59
def manual_start
revision.configuration['manual_start']
end
|
55
56
57
|
# File 'app/models/pageflow/entry_at_revision.rb', line 55
def overview_button
OverviewButton.new(revision)
end
|
43
44
45
|
# File 'app/models/pageflow/entry_at_revision.rb', line 43
def resolve_widgets(options = {})
widgets.resolve(Pageflow.config_for(entry), options)
end
|
#theme ⇒ Object
47
48
49
|
# File 'app/models/pageflow/entry_at_revision.rb', line 47
def theme
@theme ||= CustomizedTheme.find(entry: entry, theme: revision.theme)
end
|