Class: Asuka::Rules::Rule

Inherits:
Abstract 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, #transition

Constructor Details

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

Instance Method Details

#match?(line) ⇒ Boolean

Returns:

  • (Boolean)


86
87
88
# File 'lib/asuka/rules.rb', line 86

def match?(line)
  line =~ /^(-{3,}|_{3,})$/
end

#process(line) ⇒ Object



90
91
92
# File 'lib/asuka/rules.rb', line 90

def process(line)
  result << Asuka::Rule.new
end