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.



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

#deleteObject

Returns the value of attribute delete.



51
52
53
# File 'lib/compilator.rb', line 51

def delete
  @delete
end

#last_key_pressedObject

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

#resultObject

Returns the value of attribute result.



51
52
53
# File 'lib/compilator.rb', line 51

def result
  @result
end

#scoreObject

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