Class: Paru::PandocFilter::BulletList
- Defined in:
- lib/paru/filter/bullet_list.rb
Overview
BulletList, contains a list of list of Block nodes.
Instance Attribute Summary
Attributes inherited from Node
Class Method Summary collapse
-
.from_array(items) ⇒ BulletList
Create a new BulletList from an array of markdown strings.
Methods inherited from List
#ast_contents, #has_block?, #initialize, #to_array
Methods inherited from Block
Methods inherited from Node
#ast_contents, #ast_type, #can_act_as_both_block_and_inline?, #children, #children=, #each, from_markdown, #get_replacement, #has_been_replaced?, #has_block?, #has_children?, #has_class?, #has_inline?, #has_parent?, #has_string?, #initialize, #is_block?, #is_inline?, #is_leaf?, #is_node?, #is_root?, #markdown, #markdown=, #toMetadata, #to_ast, #to_s, #type
Methods included from ASTManipulation
#append, #delete, #each_depth_first, #find_index, #get, #insert, #prepend, #remove_at, #replace, #replace_at
Constructor Details
This class inherits a constructor from Paru::PandocFilter::List
Class Method Details
.from_array(items) ⇒ BulletList
Create a new BulletList from an array of markdown strings
31 32 33 34 |
# File 'lib/paru/filter/bullet_list.rb', line 31 def self.from_array(items) ast_items = items.map {|item| [Block.from_markdown(item).to_ast]} BulletList.new ast_items end |