Skip to content

Instantly share code, notes, and snippets.

@robins35
Created December 12, 2019 21:43
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 robins35/66f6d3df822217eaffe3dcd5301a193a to your computer and use it in GitHub Desktop.
Save robins35/66f6d3df822217eaffe3dcd5301a193a to your computer and use it in GitHub Desktop.
def file_names
super.try(:split, ',').to_a
end
#
def file_names=(value)
joined_value = value.join(',')
super(joined_value)
end
def file_names<< (value)
if file_names.empty?
file_names = value
else
file_names = file_names + [value]
end
end
alias push <<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment