Skip to content

Instantly share code, notes, and snippets.

@bretweinraub
Created November 12, 2010 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bretweinraub/674464 to your computer and use it in GitHub Desktop.
Save bretweinraub/674464 to your computer and use it in GitHub Desktop.
def value=(new_value=[])
if new_value.is_a? String
new_value = new_value.split(delimiter)
end
raise ArgumentError("argument to #{current_method} must be an Array").new unless new_value.is_a? Array
@value = new_value
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment