Class: SmsBackupRenderer::IndexPage

Inherits:
BasePage
  • Object
show all
Defined in:
lib/sms_backup_renderer/renderer.rb

Instance Attribute Summary collapse

Attributes inherited from BasePage

#assets_dir_path, #output_file_path

Instance Method Summary collapse

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_pagesObject (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_nameObject



49
50
51
# File 'lib/sms_backup_renderer/renderer.rb', line 49

def template_name
  'index.html.erb'
end