Class: Pivorak::Mark
- Inherits:
-
Object
- Object
- Pivorak::Mark
- Defined in:
- lib/pivorak.rb
Instance Attribute Summary collapse
-
#point ⇒ Object
readonly
Returns the value of attribute point.
Instance Method Summary collapse
- #feedback ⇒ Object
-
#initialize(point) ⇒ Mark
constructor
A new instance of Mark.
Constructor Details
#initialize(point) ⇒ Mark
Returns a new instance of Mark.
7 8 9 |
# File 'lib/pivorak.rb', line 7 def initialize(point) @point = point end |
Instance Attribute Details
#point ⇒ Object (readonly)
Returns the value of attribute point.
5 6 7 |
# File 'lib/pivorak.rb', line 5 def point @point end |
Instance Method Details
#feedback ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pivorak.rb', line 11 def feedback case point when -1 then 'Pffffff... where is your homework?' when 0 then 'Not nice. You should try better next time' when 1 then 'Good job!' else 'Wowow... only -1, 0 or 1 allowed' end end |