Class: Compilator::CompilatorModel
- Inherits:
-
Druzy::MVC::Model
- Object
- Druzy::MVC::Model
- Compilator::CompilatorModel
- Defined in:
- lib/compilator.rb
Instance Attribute Summary collapse
-
#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.
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.
54 55 56 57 58 59 60 61 |
# File 'lib/compilator.rb', line 54 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 end |
Instance Attribute Details
#delete ⇒ Object
Returns the value of attribute delete.
51 52 53 |
# File 'lib/compilator.rb', line 51 def delete @delete end |
#last_key_pressed ⇒ Object
Returns the value of attribute last_key_pressed.
51 52 53 |
# File 'lib/compilator.rb', line 51 def last_key_pressed @last_key_pressed end |
#result ⇒ Object
Returns the value of attribute result.
51 52 53 |
# File 'lib/compilator.rb', line 51 def result @result end |
#score ⇒ Object
Returns the value of attribute score.
51 52 53 |
# File 'lib/compilator.rb', line 51 def score @score end |
Instance Method Details
#raz=(raz) ⇒ Object
73 74 75 76 |
# File 'lib/compilator.rb', line 73 def raz=(raz) old, @raz = @raz, raz fire_property_change(Druzy::MVC::PropertyChangeEvent.new(self,"raz",old,@raz)) end |