Class: EideticRML::Support::Bounds

Inherits:
Object
  • Object
show all
Defined in:
lib/erml_support.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bottomObject

Returns the value of attribute bottom.



42
43
44
# File 'lib/erml_support.rb', line 42

def bottom
  @bottom
end

#leftObject

Returns the value of attribute left.



42
43
44
# File 'lib/erml_support.rb', line 42

def left
  @left
end

#rightObject

Returns the value of attribute right.



42
43
44
# File 'lib/erml_support.rb', line 42

def right
  @right
end

#topObject

Returns the value of attribute top.



42
43
44
# File 'lib/erml_support.rb', line 42

def top
  @top
end

Instance Method Details

#heightObject



52
53
54
# File 'lib/erml_support.rb', line 52

def height
  bottom - top
end

#widthObject



48
49
50
# File 'lib/erml_support.rb', line 48

def width
  right - left
end