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.



240
241
242
243
244
245
246
# File 'lib/kpeg/format_parser.rb', line 240

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.



248
249
250
# File 'lib/kpeg/format_parser.rb', line 248

def ans
  @ans
end

#left_recObject

Returns the value of attribute left_rec.



249
250
251
# File 'lib/kpeg/format_parser.rb', line 249

def left_rec
  @left_rec
end

#posObject (readonly)

Returns the value of attribute pos.



248
249
250
# File 'lib/kpeg/format_parser.rb', line 248

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



248
249
250
# File 'lib/kpeg/format_parser.rb', line 248

def result
  @result
end

#setObject (readonly)

Returns the value of attribute set.



248
249
250
# File 'lib/kpeg/format_parser.rb', line 248

def set
  @set
end

Instance Method Details

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



251
252
253
254
255
256
257
# File 'lib/kpeg/format_parser.rb', line 251

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