lib/caramelize/wiki/wiki.rb in caramelize-0.1.2 vs lib/caramelize/wiki/wiki.rb in caramelize-0.2.0
- old
+ new
@@ -1,13 +1,16 @@
+#Encoding: UTF-8
module Caramelize
autoload :DatabaseConnector, 'caramelize/database_connector'
class Wiki
include DatabaseConnector
- attr_accessor :revisions, :wiki_title, :titles, :description
+ attr_accessor :revisions, :wiki_title, :titles, :description, :namespaces, :options
def initialize options={}
@options = options
+ @options[:filters] = []
+ @namespaces = []
end
def revisions_by_title title
if @titles.index title
# new array only containing pages by this name sorted by time
@@ -18,14 +21,19 @@
# return an empty array in case this action was not overridden
def read_authors
return []
end
+
def convert_markup? to_markup
markup != to_markup
end
+
+ def filters
+ @options[:filters]
+ end
def latest_revisions
@latest_revisions = []
for title in @titles
# pick first revision by descending date
@@ -35,7 +43,8 @@
end
def markup
@options[:markup]
end
+
end
end
\ No newline at end of file