Class: WikiMindCardsDirectory::MindWordsX
- Inherits:
-
MindWords
- Object
- MindWords
- WikiMindCardsDirectory::MindWordsX
- Includes:
- RXFReadWriteModule
- Defined in:
- lib/wikimindcards_directory.rb
Instance Method Summary collapse
- #edit ⇒ Object
- #import(s = '') ⇒ Object
-
#initialize(dir, s = '') ⇒ MindWordsX
constructor
A new instance of MindWordsX.
Constructor Details
#initialize(dir, s = '') ⇒ MindWordsX
Returns a new instance of MindWordsX.
76 77 78 79 80 81 |
# File 'lib/wikimindcards_directory.rb', line 76 def initialize(dir, s='') @dir = dir super(s) end |
Instance Method Details
#edit ⇒ Object
83 84 85 86 87 88 89 90 91 |
# File 'lib/wikimindcards_directory.rb', line 83 def edit() %Q(<form action="fileupdate" method="post"> <textarea name="treelinks" cols="73" rows="17">#{self.to_s}</textarea> <input type="submit" value="apply"/> </form> ) end |
#import(s = '') ⇒ Object
94 95 96 97 98 99 100 101 102 |
# File 'lib/wikimindcards_directory.rb', line 94 def import(s='') super(s) FileX.mkdir_p File.join(@dir, 'data') mindwords_file = File.join(@dir, 'data', 'mindwords.txt') self.save mindwords_file end |