class Qrio::VerticalMatch

Public Class Methods

build(offset, origin, terminus) click to toggle source
# File lib/qrio/vertical_match.rb, line 3
def self.build(offset, origin, terminus)
  new(offset, origin, offset, terminus)
end

Public Instance Methods

breadth() click to toggle source
# File lib/qrio/vertical_match.rb, line 15
def breadth
  width
end
left_of?(other) click to toggle source
# File lib/qrio/vertical_match.rb, line 19
def left_of?(other)
  right < other.left
end
length() click to toggle source
# File lib/qrio/vertical_match.rb, line 11
def length
  height
end
offset() click to toggle source
# File lib/qrio/vertical_match.rb, line 7
def offset;   left;   end
offset_diff(other) click to toggle source
# File lib/qrio/vertical_match.rb, line 27
def offset_diff(other)
  left_of?(other) ? other.left - right : left - other.right
end
origin() click to toggle source
# File lib/qrio/vertical_match.rb, line 8
def origin;   top;    end
right_of?(other) click to toggle source
# File lib/qrio/vertical_match.rb, line 23
def right_of?(other)
  left > other.right
end
terminus() click to toggle source
# File lib/qrio/vertical_match.rb, line 9
def terminus; bottom; end