class Caramelize::InputWiki::WikkaWiki
Constants
- FUNCTION_PAGES
- SQL_AUTHORS
- SQL_PAGES
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
Caramelize::InputWiki::Wiki::new
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 16 def initialize(options = {}) super(options) @options[:markup] = :wikka @options[:filters] << ::Caramelize::AddNewlineToPageEnd @options[:filters] << ::Caramelize::WikkaToMarkdown @options[:filters] << ::Caramelize::CamelCaseToWikiLinks end
Public Instance Methods
excluded_pages()
click to toggle source
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 41 def excluded_pages FUNCTION_PAGES end
read_pages()
click to toggle source
after calling this action, titles and @revisions are expected to be filled
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 25 def read_pages pages.each do |row| titles << row['tag'] revisions << Page.new(build_properties(row)) end titles.uniq! revisions end
Private Instance Methods
build_properties(row)
click to toggle source
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 59 def build_properties(row) author = authors[row['user']] { id: row['id'], title: row['tag'], body: row['body'], markup: :wikka, latest: row['latest'] == 'Y', time: row['time'], message: row['note'], author: } end
pages()
click to toggle source
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 55 def pages @pages ||= database.query(pages_query) end
pages_query()
click to toggle source
# File lib/caramelize/input_wiki/wikka_wiki.rb, line 47 def pages_query SQL_PAGES end