Class: NumbersInWords::ParseStatus
- Inherits:
-
Object
- Object
- NumbersInWords::ParseStatus
- Defined in:
- lib/numbers_in_words/parsing/parse_status.rb
Instance Attribute Summary collapse
-
#answer ⇒ Object
Returns the value of attribute answer.
-
#memory ⇒ Object
Returns the value of attribute memory.
-
#reset ⇒ Object
Returns the value of attribute reset.
Instance Method Summary collapse
- #calculate ⇒ Object
-
#initialize ⇒ ParseStatus
constructor
A new instance of ParseStatus.
Constructor Details
#initialize ⇒ ParseStatus
7 8 9 10 11 |
# File 'lib/numbers_in_words/parsing/parse_status.rb', line 7 def initialize @reset = true @memory = 0 @answer = 0 end |
Instance Attribute Details
#answer ⇒ Object
Returns the value of attribute answer.
5 6 7 |
# File 'lib/numbers_in_words/parsing/parse_status.rb', line 5 def answer @answer end |
#memory ⇒ Object
Returns the value of attribute memory.
5 6 7 |
# File 'lib/numbers_in_words/parsing/parse_status.rb', line 5 def memory @memory end |
#reset ⇒ Object
Returns the value of attribute reset.
5 6 7 |
# File 'lib/numbers_in_words/parsing/parse_status.rb', line 5 def reset @reset end |
Instance Method Details
#calculate ⇒ Object
13 14 15 |
# File 'lib/numbers_in_words/parsing/parse_status.rb', line 13 def calculate answer + memory end |