Class: Raykit::Markdown

Inherits:
Object
  • Object
show all
Defined in:
lib/raykit/markdown.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMarkdown

Returns a new instance of Markdown.



5
6
7
# File 'lib/raykit/markdown.rb', line 5

def initialize()
  @text = ""
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/raykit/markdown.rb', line 3

def text
  @text
end

Instance Method Details

#puts(line) ⇒ Object



9
10
11
# File 'lib/raykit/markdown.rb', line 9

def puts(line)
  @text = @text + "\n" + line
end

#save_as(filename) ⇒ Object



17
18
19
# File 'lib/raykit/markdown.rb', line 17

def save_as(filename)
  File.write("rake.md", @text)
end

#to_sObject



13
14
15
# File 'lib/raykit/markdown.rb', line 13

def to_s()
  @text
end