Method: Sass::Util#paths
- Defined in:
- lib/sass/util.rb
#paths(arrs) ⇒ Array<Arrays>
Return an array of all possible paths through the given arrays.
321 322 323 324 325 |
# File 'lib/sass/util.rb', line 321
def paths(arrs)
arrs.inject([[]]) do |paths, arr|
arr.map {|e| paths.map {|path| path + [e]}}.flatten(1)
end
end
|