Class: WunderMarkdown::List
- Inherits:
-
Struct
- Object
- Struct
- WunderMarkdown::List
- Defined in:
- lib/wunder_markdown/list.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/wunder_markdown/list.rb', line 3 def client @client end |
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/wunder_markdown/list.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/wunder_markdown/list.rb', line 2 def name @name end |
#tasks ⇒ Object
Returns the value of attribute tasks.
3 4 5 |
# File 'lib/wunder_markdown/list.rb', line 3 def tasks @tasks end |
Instance Method Details
#to_markdown ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/wunder_markdown/list.rb', line 5 def to_markdown markdown = "# #{name} \n \n" if tasks markdown += tasks.map(&:to_markdown).join(" \n") end markdown end |