Is there a better (more eloquent) way to check for valid params?
def load_data filename, start_percent, end_percent
raise 'Values must be [0,1]' if start_percent < 0
raise 'Values must be [0,1]' if end_percent < 0
raise 'Values must be [0,1]' if start_percent > 1
raise 'Values must be [0,1]' if end_percent > 1
...
Ruby 1.9.3
EDIT: start_percent
and end_percent
are supposed to be floats.