Class: KPeg::FormatParser::MemoEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/kpeg/format_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ans, pos) ⇒ MemoEntry

Returns a new instance of MemoEntry.



204
205
206
207
208
209
210
# File 'lib/kpeg/format_parser.rb', line 204

def initialize(ans, pos)
  @ans = ans
  @pos = pos
  @result = nil
  @set = false
  @left_rec = false
end

Instance Attribute Details

#ansObject (readonly)

Returns the value of attribute ans.



212
213
214
# File 'lib/kpeg/format_parser.rb', line 212

def ans
  @ans
end

#left_recObject

Returns the value of attribute left_rec.



213
214
215
# File 'lib/kpeg/format_parser.rb', line 213

def left_rec
  @left_rec
end

#posObject (readonly)

Returns the value of attribute pos.



212
213
214
# File 'lib/kpeg/format_parser.rb', line 212

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



212
213
214
# File 'lib/kpeg/format_parser.rb', line 212

def result
  @result
end

#setObject (readonly)

Returns the value of attribute set.



212
213
214
# File 'lib/kpeg/format_parser.rb', line 212

def set
  @set
end

Instance Method Details

#move!(ans, pos, result) ⇒ Object



215
216
217
218
219
220
221
# File 'lib/kpeg/format_parser.rb', line 215

def move!(ans, pos, result)
  @ans = ans
  @pos = pos
  @result = result
  @set = true
  @left_rec = false
end