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, global_find, global_path_match, #header, #historical?, #inspect, #last_version, #markup, #metadata, #metadata_title, #name, path_compare, #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

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

Constructor Details

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

Returns a new instance of PreviewPage.



377
378
379
380
381
382
383
384
385
386
# File 'lib/gollum-lib/page.rb', line 377

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.



375
376
377
# File 'lib/gollum-lib/page.rb', line 375

def path
  @path
end