class Swordfish::Node::ListItem
Public Instance Methods
nested_list()
click to toggle source
Return the nested list, or nil if this list item has no nested lists
# File lib/swordfish/nodes/list_item.rb, line 12 def nested_list @children.last.is_a?(Swordfish::Node::List) ? @children.last : nil end
to_html()
click to toggle source
# File lib/swordfish/nodes/list_item.rb, line 7 def to_html "<li>#{@children.map(&:to_html).join.strip}</li>" end