class Precious::Views::Create
Attributes
name[R]
page[R]
Public Instance Methods
allow_uploads()
click to toggle source
# File lib/gollum/views/create.rb, line 21 def allow_uploads @allow_uploads end
content()
click to toggle source
QND - sets default template page if specified
# File lib/gollum/views/create.rb, line 42 def content @template_page end
default_markup()
click to toggle source
# File lib/gollum/views/create.rb, line 37 def default_markup Precious::App.settings.default_markup end
format()
click to toggle source
# File lib/gollum/views/create.rb, line 25 def format @format ||= find_format.to_s.downcase end
formats()
click to toggle source
Calls superclass method
Precious::Editable#formats
# File lib/gollum/views/create.rb, line 33 def formats super(find_format) end
is_create_page()
click to toggle source
# File lib/gollum/views/create.rb, line 13 def is_create_page true end
is_edit_page()
click to toggle source
# File lib/gollum/views/create.rb, line 17 def is_edit_page false end
page_name()
click to toggle source
# File lib/gollum/views/create.rb, line 29 def page_name @name end
title()
click to toggle source
# File lib/gollum/views/create.rb, line 9 def title "Create a new page" end
Private Instance Methods
find_format()
click to toggle source
# File lib/gollum/views/create.rb, line 48 def find_format @found_format ||= (Gollum::Page.format_for("#{@name}#{@ext}") || default_markup) end