Class: ToHiki
- Inherits:
-
Object
- Object
- ToHiki
- Defined in:
- lib/org2hiki/org2hiki.rb
Overview
convert org formatted lines to hiki
Instance Method Summary collapse
-
#convert(lines) ⇒ Object
converter.
-
#initialize ⇒ ToHiki
constructor
A new instance of ToHiki.
Constructor Details
#initialize ⇒ ToHiki
Returns a new instance of ToHiki.
4 5 6 7 |
# File 'lib/org2hiki/org2hiki.rb', line 4 def initialize() @in_example = false @outputs = [] end |
Instance Method Details
#convert(lines) ⇒ Object
converter
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/org2hiki/org2hiki.rb', line 10 def convert(lines) lines.split(/\n/).each do |line| next if check_block?(line) line = check_word line line = check_link line line = check_head line @outputs << line end @outputs.join("\n") end |