Class: Raykit::Markdown
- Inherits:
-
Object
- Object
- Raykit::Markdown
- Defined in:
- lib/raykit/markdown.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize ⇒ Markdown
constructor
A new instance of Markdown.
- #puts(line) ⇒ Object
- #save_as(filename) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Markdown
Returns a new instance of Markdown.
5 6 7 |
# File 'lib/raykit/markdown.rb', line 5 def initialize() @text = "" end |
Instance Attribute Details
#text ⇒ Object
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_s ⇒ Object
13 14 15 |
# File 'lib/raykit/markdown.rb', line 13 def to_s() @text end |