Class: Quartz::Size
- Inherits:
-
Object
- Object
- Quartz::Size
- Defined in:
- lib/rubyquartz/size.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width, height) ⇒ Size
constructor
A new instance of Size.
- #to_s ⇒ Object
Constructor Details
#initialize(width, height) ⇒ Size
Returns a new instance of Size.
30 31 32 33 |
# File 'lib/rubyquartz/size.rb', line 30 def initialize(width, height) @width = width @height = height end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
28 29 30 |
# File 'lib/rubyquartz/size.rb', line 28 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
28 29 30 |
# File 'lib/rubyquartz/size.rb', line 28 def width @width end |
Instance Method Details
#to_s ⇒ Object
35 36 37 |
# File 'lib/rubyquartz/size.rb', line 35 def to_s "(#{@width}, #{@height})" end |