Class: Asuka::Rules::UnorderedList

Inherits:
Abstract
  • Object
show all
Defined in:
lib/asuka/rules.rb

Instance Attribute Summary

Attributes inherited from Abstract

#acc, #line_formatter, #result

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from Asuka::Rules::Abstract

Instance Method Details

#match?(line) ⇒ Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/asuka/rules.rb', line 72

def match?(line)
  line =~ /^\* /
end

#process(line) ⇒ Object



80
81
82
# File 'lib/asuka/rules.rb', line 80

def process(line)
  acc.push(line_formatter.format(line[2..-1]))
end

#transitionObject



76
77
78
# File 'lib/asuka/rules.rb', line 76

def transition
  result << Asuka::UnorderedList.new(acc.flush)
end