Class: PPZ::UnorderedListItemModel

Inherits:
AbstractListItemModel show all
Defined in:
lib/doc/model/list/item/unordered.rb

Constant Summary collapse

REG_EXP =
/^(\++) (.+)/

Instance Attribute Summary

Attributes inherited from AbstractListItemModel

#level

Attributes inherited from AbstractModel

#father_model, #index, #left_model, #right_model

Class Method Summary collapse

Methods inherited from AbstractListItemModel

#initialize, #to_html

Methods inherited from AbstractModel

#transform_inline_element

Constructor Details

This class inherits a constructor from PPZ::AbstractListItemModel

Class Method Details

.from_line(line) ⇒ Object



3
4
5
6
# File 'lib/doc/model/list/item/unordered.rb', line 3

def self.from_line line
  return nil unless REG_EXP.match(line)
  self.new $2, $1.size
end