Skip to content

Instantly share code, notes, and snippets.

@bascht
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save bascht/3e77b239bca0506921d1 to your computer and use it in GitHub Desktop.

Select an option

Save bascht/3e77b239bca0506921d1 to your computer and use it in GitHub Desktop.
def mount(folders)
folders.map do |name, options|
check_compatibility!
folder(name, options)
end
end
@code-later
Copy link

def mount(folders)
  folders.map(&method(:folder))
end

Assuming folders is an Array of Arrays you must change the folder method accordingly:

def folder(*args)
  name, options = *args
  # Your code
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment