class MarkdownToRspec::ToRspec::Item::List
Attributes
children[RW]
depth[R]
parent[R]
Public Class Methods
new(parent: nil, children: [])
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/list.rb, line 7 def initialize(parent: nil, children: []) @parent = parent @children = children @depth = parent ? parent.depth + 1 : 0 end
Public Instance Methods
convert()
click to toggle source
# File lib/markdown_to_rspec/to_rspec/item/list.rb, line 16 def convert children.map(&:convert).join("\n") end