Class: Range

Inherits:
Object show all
Defined in:
lib/picky/analyzer.rb

Instance Method Summary collapse

Instance Method Details

#expand_with(thing) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/picky/analyzer.rb', line 5

def expand_with thing
  return (thing..thing) unless min
  if max < thing
    (min..thing)
  else
    thing < min ? (thing..max) : self
  end
end