Class: Moory::RuleParser::LineReader

Inherits:
Transducer show all
Defined in:
lib/moory/ruleparser.rb

Constant Summary collapse

IGNORE =
[ " ", "\t" ]

Instance Attribute Summary collapse

Attributes included from Efferent

#repertoire

Attributes included from Afferent

#state, #transitions

Instance Method Summary collapse

Methods included from Afferent

#awaits, #issue, #understand?

Constructor Details

#initializeLineReader

Returns a new instance of LineReader.



24
25
26
27
# File 'lib/moory/ruleparser.rb', line 24

def initialize
  @transitions = Transitions
  prepare
end

Instance Attribute Details

#scan_dataObject (readonly)

Returns the value of attribute scan_data.



20
21
22
# File 'lib/moory/ruleparser.rb', line 20

def scan_data
  @scan_data
end

Instance Method Details

#<<(string) ⇒ Object



34
35
36
# File 'lib/moory/ruleparser.rb', line 34

def <<(string)
  puts(string)
end

#resetObject



29
30
31
32
# File 'lib/moory/ruleparser.rb', line 29

def reset
  @state     = 'origin'
  @scan_data = {}
end