Class: Rhythmmml::Object::Info
- Inherits:
-
Object
- Object
- Rhythmmml::Object::Info
- Includes:
- Base
- Defined in:
- lib/rhythmmml/object.rb
Instance Attribute Summary collapse
-
#score ⇒ Object
Returns the value of attribute score.
Attributes included from Base
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(window, x, y, options = {}) ⇒ Info
constructor
A new instance of Info.
Methods included from Base
Constructor Details
#initialize(window, x, y, options = {}) ⇒ Info
Returns a new instance of Info.
65 66 67 68 |
# File 'lib/rhythmmml/object.rb', line 65 def initialize(window, x, y, ={}) super @score = 0 end |
Instance Attribute Details
#score ⇒ Object
Returns the value of attribute score.
64 65 66 |
# File 'lib/rhythmmml/object.rb', line 64 def score @score end |
Instance Method Details
#draw ⇒ Object
70 71 72 73 |
# File 'lib/rhythmmml/object.rb', line 70 def draw @font.draw("SCORE:", @x, @y, @z_order) @font.draw("%08d" % @score, @x, @y + @font_size, @z_order) end |