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
61
62
63
|
# File 'app/models/pageflow/entry_at_revision.rb', line 61
def emphasize_chapter_beginning
revision.configuration['emphasize_chapter_beginning']
end
|
#emphasize_new_pages ⇒ Object
65
66
67
|
# File 'app/models/pageflow/entry_at_revision.rb', line 65
def emphasize_new_pages
revision.configuration['emphasize_new_pages']
end
|
49
50
51
|
# File 'app/models/pageflow/entry_at_revision.rb', line 49
def home_button
HomeButton.new(revision, theming)
end
|
#manual_start ⇒ Object
57
58
59
|
# File 'app/models/pageflow/entry_at_revision.rb', line 57
def manual_start
revision.configuration['manual_start']
end
|
53
54
55
|
# File 'app/models/pageflow/entry_at_revision.rb', line 53
def overview_button
OverviewButton.new(revision)
end
|
41
42
43
|
# File 'app/models/pageflow/entry_at_revision.rb', line 41
def resolve_widgets(options = {})
widgets.resolve(Pageflow.config_for(entry), options)
end
|
#theme ⇒ Object
45
46
47
|
# File 'app/models/pageflow/entry_at_revision.rb', line 45
def theme
@theme ||= CustomizedTheme.find(entry: entry, theme: revision.theme)
end
|