class OpenNeighbourhood
Public Class Methods
new(center, width)
click to toggle source
# File lib/cartesius/neighbourhoods.rb, line 2 def initialize(center, width) @center = center @width = width end
Public Instance Methods
include?(value)
click to toggle source
# File lib/cartesius/neighbourhoods.rb, line 7 def include?(value) (value > @center - @width) && (value < @center + @width) end