Class: EideticRML::Support::Bounds
- Inherits:
-
Object
- Object
- EideticRML::Support::Bounds
- Defined in:
- lib/erml_support.rb
Instance Attribute Summary collapse
-
#bottom ⇒ Object
Returns the value of attribute bottom.
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
-
#top ⇒ Object
Returns the value of attribute top.
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(*args) ⇒ Bounds
constructor
A new instance of Bounds.
- #width ⇒ Object
Constructor Details
#initialize(*args) ⇒ Bounds
44 45 46 |
# File 'lib/erml_support.rb', line 44 def initialize(*args) @left, @top, @right, @bottom = *args end |
Instance Attribute Details
#bottom ⇒ Object
Returns the value of attribute bottom.
42 43 44 |
# File 'lib/erml_support.rb', line 42 def bottom @bottom end |
#left ⇒ Object
Returns the value of attribute left.
42 43 44 |
# File 'lib/erml_support.rb', line 42 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
42 43 44 |
# File 'lib/erml_support.rb', line 42 def right @right end |
#top ⇒ Object
Returns the value of attribute top.
42 43 44 |
# File 'lib/erml_support.rb', line 42 def top @top end |
Instance Method Details
#height ⇒ Object
52 53 54 |
# File 'lib/erml_support.rb', line 52 def height bottom - top end |
#width ⇒ Object
48 49 50 |
# File 'lib/erml_support.rb', line 48 def width right - left end |