Class: Gollum::PreviewPage

Inherits:
Page show all
Includes:
Pagination
Defined in:
lib/gollum-lib/page.rb

Constant Summary

Constants inherited from Page

Gollum::Page::SUBPAGENAMES

Constants inherited from File

File::FS_SUPPORT_SYMLINKS

Instance Attribute Summary collapse

Attributes inherited from Page

#parent_page, #wiki

Attributes inherited from File

#on_disk, #version

Instance Method Summary collapse

Methods included from Pagination

included, #log_pagination_options, #page_to_skip

Methods inherited from Page

#display_metadata?, #filename_stripped, #find_sub_pages, #footer, #format, format_for, format_to_ext, #formatted_data, #header, #historical?, #inspect, #last_version, #markup, #metadata, #metadata_title, #name, path_match, #sidebar, strip_filename, #sub_page, #text_data, #title, #toc_data, #tree_path, #url_path_title, valid_extension?, valid_page_name?, #version_short, #versions

Methods inherited from File

#escaped_url_path, #filename, find, #mime_type, #on_disk?, #on_disk_path, path_compare, path_match, protected_files, #raw_data, #sha, #url_path

Constructor Details

#initialize(wiki, name, data, version, parent_page = nil) ⇒ PreviewPage

Returns a new instance of PreviewPage.



360
361
362
363
364
365
366
367
368
369
# File 'lib/gollum-lib/page.rb', line 360

def initialize(wiki, name, data, version, parent_page = nil)
  @wiki           = wiki 
  @path           = name
  @blob           = OpenStruct.new(:name => name, :data => wiki.normalize(data), :is_symlink => false)
  @version        = version
  @formatted_data = nil
  @doc            = nil
  @parent_page    = parent_page
  @historical     = false
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



358
359
360
# File 'lib/gollum-lib/page.rb', line 358

def path
  @path
end