Class: CmdParse::MemoEntry
- Inherits:
-
Object
- Object
- CmdParse::MemoEntry
- Defined in:
- app/cmd_parser.rb
Instance Attribute Summary collapse
-
#ans ⇒ Object
readonly
Returns the value of attribute ans.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#uses ⇒ Object
readonly
Returns the value of attribute uses.
Instance Method Summary collapse
- #inc! ⇒ Object
-
#initialize(ans, pos) ⇒ MemoEntry
constructor
A new instance of MemoEntry.
- #move!(ans, pos, result) ⇒ Object
Constructor Details
#initialize(ans, pos) ⇒ MemoEntry
Returns a new instance of MemoEntry.
217 218 219 220 221 222 |
# File 'app/cmd_parser.rb', line 217 def initialize(ans, pos) @ans = ans @pos = pos @uses = 1 @result = nil end |
Instance Attribute Details
#ans ⇒ Object (readonly)
Returns the value of attribute ans.
224 225 226 |
# File 'app/cmd_parser.rb', line 224 def ans @ans end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
224 225 226 |
# File 'app/cmd_parser.rb', line 224 def pos @pos end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
224 225 226 |
# File 'app/cmd_parser.rb', line 224 def result @result end |
#uses ⇒ Object (readonly)
Returns the value of attribute uses.
224 225 226 |
# File 'app/cmd_parser.rb', line 224 def uses @uses end |
Instance Method Details
#inc! ⇒ Object
226 227 228 |
# File 'app/cmd_parser.rb', line 226 def inc! @uses += 1 end |
#move!(ans, pos, result) ⇒ Object
230 231 232 233 234 |
# File 'app/cmd_parser.rb', line 230 def move!(ans, pos, result) @ans = ans @pos = pos @result = result end |