Class: Asuka::Rules::Abstract
- Inherits:
-
Object
- Object
- Asuka::Rules::Abstract
- Defined in:
- lib/asuka/rules.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#acc ⇒ Object
readonly
Returns the value of attribute acc.
-
#line_formatter ⇒ Object
readonly
Returns the value of attribute line_formatter.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(acc, result, line_formatter) ⇒ Abstract
constructor
A new instance of Abstract.
- #match?(line) ⇒ Boolean
- #process(line) ⇒ Object
- #transition ⇒ Object
Constructor Details
#initialize(acc, result, line_formatter) ⇒ Abstract
Returns a new instance of Abstract.
17 18 19 20 21 |
# File 'lib/asuka/rules.rb', line 17 def initialize(acc, result, line_formatter) @acc = acc @result = result @line_formatter = line_formatter end |
Instance Attribute Details
#acc ⇒ Object (readonly)
Returns the value of attribute acc.
15 16 17 |
# File 'lib/asuka/rules.rb', line 15 def acc @acc end |
#line_formatter ⇒ Object (readonly)
Returns the value of attribute line_formatter.
15 16 17 |
# File 'lib/asuka/rules.rb', line 15 def line_formatter @line_formatter end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
15 16 17 |
# File 'lib/asuka/rules.rb', line 15 def result @result end |
Instance Method Details
#match?(line) ⇒ Boolean
23 24 25 |
# File 'lib/asuka/rules.rb', line 23 def match?(line) raise NotImplementedError, "%s does not implement the #match? method" % [self.class.name] end |
#process(line) ⇒ Object
31 32 33 |
# File 'lib/asuka/rules.rb', line 31 def process(line) # no-op end |
#transition ⇒ Object
27 28 29 |
# File 'lib/asuka/rules.rb', line 27 def transition # no-op end |