Class: Compilator::CompilatorModel

Inherits:
Druzy::MVC::Model
  • Object
show all
Defined in:
lib/compilator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCompilatorModel

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_pressedObject

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

#resultObject

Returns the value of attribute result.



48
49
50
# File 'lib/compilator.rb', line 48

def result
  @result
end

#scoreObject

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