class Qrio::HorizontalMatch
Public Class Methods
build(offset, origin, terminus)
click to toggle source
# File lib/qrio/horizontal_match.rb, line 3 def self.build(offset, origin, terminus) new(origin, offset, terminus, offset) end
Public Instance Methods
above?(other)
click to toggle source
# File lib/qrio/horizontal_match.rb, line 19 def above?(other) other.top > bottom end
below?(other)
click to toggle source
# File lib/qrio/horizontal_match.rb, line 23 def below?(other) other.bottom < top end
breadth()
click to toggle source
# File lib/qrio/horizontal_match.rb, line 15 def breadth height end
length()
click to toggle source
# File lib/qrio/horizontal_match.rb, line 11 def length width end
offset()
click to toggle source
# File lib/qrio/horizontal_match.rb, line 7 def offset; top; end
offset_diff(other)
click to toggle source
# File lib/qrio/horizontal_match.rb, line 27 def offset_diff(other) above?(other) ? other.top - bottom : top - other.bottom end
origin()
click to toggle source
# File lib/qrio/horizontal_match.rb, line 8 def origin; left; end
terminus()
click to toggle source
# File lib/qrio/horizontal_match.rb, line 9 def terminus; right; end