Class: Wikisys::Pages
- Inherits:
-
Object
- Object
- Wikisys::Pages
- Defined in:
- lib/wikisys.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#mw ⇒ Object
Returns the value of attribute mw.
Instance Method Summary collapse
-
#initialize(filepath = '.', debug: false) ⇒ Pages
constructor
A new instance of Pages.
Constructor Details
#initialize(filepath = '.', debug: false) ⇒ Pages
Returns a new instance of Pages.
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/wikisys.rb', line 292 def initialize(filepath='.', debug: false) @filepath, @debug = filepath, debug entries_file = File.join(@filepath, 'entries.txt') if File.exists?(entries_file) then @entries = DxLite.new(entries_file) else @entries = DxLite.new('entries/entry(title, tags)') @entries.save entries_file end # check for the mindwords raw document file mindwords_file = File.join(@filepath, 'mindwords.txt') if File.exists?(mindwords_file) then @mw = MindWords.new(mindwords_file) else @mw = MindWords.new @mw.filepath = mindwords_file end scan_md_files() end |
Instance Attribute Details
#entries ⇒ Object
Returns the value of attribute entries.
290 291 292 |
# File 'lib/wikisys.rb', line 290 def entries @entries end |
#mw ⇒ Object
Returns the value of attribute mw.
290 291 292 |
# File 'lib/wikisys.rb', line 290 def mw @mw end |