Class: SmsBackupRenderer::IndexPage
- Defined in:
- lib/sms_backup_renderer/renderer.rb
Instance Attribute Summary collapse
-
#conversation_pages ⇒ Object
readonly
Returns an Array ConversationPage instances which this page should link to.
Attributes inherited from BasePage
#assets_dir_path, #output_file_path
Instance Method Summary collapse
-
#initialize(output_file_path, assets_dir_path, conversation_pages) ⇒ IndexPage
constructor
A new instance of IndexPage.
- #template_name ⇒ Object
Methods inherited from BasePage
#asset_path, #relative_path, #render, #write
Constructor Details
#initialize(output_file_path, assets_dir_path, conversation_pages) ⇒ IndexPage
Returns a new instance of IndexPage.
44 45 46 47 |
# File 'lib/sms_backup_renderer/renderer.rb', line 44 def initialize(output_file_path, assets_dir_path, conversation_pages) super(output_file_path, assets_dir_path) @conversation_pages = conversation_pages.sort_by(&:title) end |
Instance Attribute Details
#conversation_pages ⇒ Object (readonly)
Returns an Array ConversationPage instances which this page should link to.
42 43 44 |
# File 'lib/sms_backup_renderer/renderer.rb', line 42 def conversation_pages @conversation_pages end |
Instance Method Details
#template_name ⇒ Object
49 50 51 |
# File 'lib/sms_backup_renderer/renderer.rb', line 49 def template_name 'index.html.erb' end |