Class: Compilator::CompilatorModel
- Inherits:
-
Druzy::MVC::Model
- Object
- Druzy::MVC::Model
- Compilator::CompilatorModel
- Defined in:
- lib/compilator.rb
Instance Attribute Summary collapse
-
#calculatrice ⇒ Object
Returns the value of attribute calculatrice.
-
#delete ⇒ Object
Returns the value of attribute delete.
-
#last_key_pressed ⇒ Object
Returns the value of attribute last_key_pressed.
-
#result ⇒ Object
Returns the value of attribute result.
-
#score ⇒ Object
Returns the value of attribute score.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize ⇒ CompilatorModel
constructor
A new instance of CompilatorModel.
- #raz=(raz) ⇒ Object
- #raz_total=(raz_total) ⇒ Object
- #result_arrondi=(result_arrondi) ⇒ Object
- #result_total=(result_total) ⇒ Object
Constructor Details
#initialize ⇒ CompilatorModel
70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/compilator.rb', line 70 def initialize super() @score = {'r' => 0, 'o' => 1, 'j' => 2, 'c' => 3, 'v' => 4, 'e' => 5} @last_key_pressed = nil @result = nil @raz = false @delete = false @result_total = nil @result_arrondi = nil @raz_total end |
Instance Attribute Details
#calculatrice ⇒ Object
Returns the value of attribute calculatrice.
67 68 69 |
# File 'lib/compilator.rb', line 67 def calculatrice @calculatrice end |
#delete ⇒ Object
Returns the value of attribute delete.
67 68 69 |
# File 'lib/compilator.rb', line 67 def delete @delete end |
#last_key_pressed ⇒ Object
Returns the value of attribute last_key_pressed.
67 68 69 |
# File 'lib/compilator.rb', line 67 def last_key_pressed @last_key_pressed end |
#result ⇒ Object
Returns the value of attribute result.
67 68 69 |
# File 'lib/compilator.rb', line 67 def result @result end |
#score ⇒ Object
Returns the value of attribute score.
67 68 69 |
# File 'lib/compilator.rb', line 67 def score @score end |
#total ⇒ Object
Returns the value of attribute total.
67 68 69 |
# File 'lib/compilator.rb', line 67 def total @total end |
Instance Method Details
#raz=(raz) ⇒ Object
92 93 94 95 |
# File 'lib/compilator.rb', line 92 def raz=(raz) old, @raz = @raz, raz fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,"raz",old,@raz)) end |
#raz_total=(raz_total) ⇒ Object
112 113 114 115 |
# File 'lib/compilator.rb', line 112 def raz_total=(raz_total) old, @raz_total = @raz_total, raz_total fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,'raz_total',old,@raz_total)) end |
#result_arrondi=(result_arrondi) ⇒ Object
107 108 109 110 |
# File 'lib/compilator.rb', line 107 def result_arrondi=(result_arrondi) old, @result_arrondi = @result_arrondi, result_arrondi fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,'result_arrondi',old,@result_arrondi)) end |
#result_total=(result_total) ⇒ Object
102 103 104 105 |
# File 'lib/compilator.rb', line 102 def result_total=(result_total) old, @result_total = @result_total, result_total fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,'result_total',old,@result_total)) end |