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.



220
221
222
223
224
225
226
# File 'lib/kpeg/format_parser.rb', line 220

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.



228
229
230
# File 'lib/kpeg/format_parser.rb', line 228

def ans
  @ans
end

#left_recObject

Returns the value of attribute left_rec.



229
230
231
# File 'lib/kpeg/format_parser.rb', line 229

def left_rec
  @left_rec
end

#posObject (readonly)

Returns the value of attribute pos.



228
229
230
# File 'lib/kpeg/format_parser.rb', line 228

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



228
229
230
# File 'lib/kpeg/format_parser.rb', line 228

def result
  @result
end

#setObject (readonly)

Returns the value of attribute set.



228
229
230
# File 'lib/kpeg/format_parser.rb', line 228

def set
  @set
end

Instance Method Details

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



231
232
233
234
235
236
237
# File 'lib/kpeg/format_parser.rb', line 231

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