class Compilator::CompilatorModel

Attributes

calculatrice[RW]
delete[RW]
last_key_pressed[RW]
result[RW]
score[RW]
total[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# 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

Public Instance Methods

delete=(delete) click to toggle source
# File lib/compilator.rb, line 97
def delete=(delete)
  old, @delete = @delete, delete
  fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,'delete',old,@delete))
end
last_key_pressed=(last_key_pressed) click to toggle source
# File lib/compilator.rb, line 82
def last_key_pressed=(last_key_pressed)
  old, @last_key_pressed = @last_key_pressed, last_key_pressed
  fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,"last_key_pressed",old,@last_key_pressed))
end
raz=(raz) click to toggle source
# 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) click to toggle source
# 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=(result) click to toggle source
# File lib/compilator.rb, line 87
def result=(result)
  old, @result = @result, result
  fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,"result",old,@result))
end
result_arrondi=(result_arrondi) click to toggle source
# 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) click to toggle source
# 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