Class: Compilator::CompilatorModel
- Inherits:
-
Druzy::MVC::Model
- Object
- Druzy::MVC::Model
- Compilator::CompilatorModel
- Defined in:
- lib/compilator.rb
Instance Attribute Summary collapse
-
#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.
Instance Method Summary collapse
-
#initialize ⇒ CompilatorModel
constructor
A new instance of CompilatorModel.
- #raz=(raz) ⇒ Object
Constructor Details
#initialize ⇒ CompilatorModel
Returns a new instance of CompilatorModel.
51 52 53 54 55 56 57 |
# File 'lib/compilator.rb', line 51 def initialize super() @score = {'r' => 0, 'o' => 1, 'j' => 2, 'c' => 3, 'v' => 4, 'e' => 5} @last_key_pressed = nil @result = nil @raz = false end |
Instance Attribute Details
#last_key_pressed ⇒ Object
Returns the value of attribute last_key_pressed.
48 49 50 |
# File 'lib/compilator.rb', line 48 def last_key_pressed @last_key_pressed end |
#result ⇒ Object
Returns the value of attribute result.
48 49 50 |
# File 'lib/compilator.rb', line 48 def result @result end |
#score ⇒ Object
Returns the value of attribute score.
48 49 50 |
# File 'lib/compilator.rb', line 48 def score @score end |
Instance Method Details
#raz=(raz) ⇒ Object
69 70 71 72 |
# File 'lib/compilator.rb', line 69 def raz=(raz) old, @raz = @raz, raz fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,"raz",old,@raz)) end |