Class: CmdParse::MemoEntry

Inherits:
Object
  • Object
show all
Defined in:
app/cmd_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ans, pos) ⇒ MemoEntry

Returns a new instance of MemoEntry.



185
186
187
188
189
190
# File 'app/cmd_parser.rb', line 185

def initialize(ans, pos)
  @ans = ans
  @pos = pos
  @uses = 1
  @result = nil
end

Instance Attribute Details

#ansObject (readonly)

Returns the value of attribute ans.



192
193
194
# File 'app/cmd_parser.rb', line 192

def ans
  @ans
end

#posObject (readonly)

Returns the value of attribute pos.



192
193
194
# File 'app/cmd_parser.rb', line 192

def pos
  @pos
end

#resultObject (readonly)

Returns the value of attribute result.



192
193
194
# File 'app/cmd_parser.rb', line 192

def result
  @result
end

#usesObject (readonly)

Returns the value of attribute uses.



192
193
194
# File 'app/cmd_parser.rb', line 192

def uses
  @uses
end

Instance Method Details

#inc!Object



194
195
196
# File 'app/cmd_parser.rb', line 194

def inc!
  @uses += 1
end

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



198
199
200
201
202
# File 'app/cmd_parser.rb', line 198

def move!(ans, pos, result)
  @ans = ans
  @pos = pos
  @result = result
end