Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/skittlize.rb

Instance Method Summary collapse

Instance Method Details

#skittlize(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/skittlize.rb', line 6

def skittlize(options = {})
  map do |cell|
    case cell
    when Array, String
      cell.skittlize(options)
    else
      cell
    end
  end
end

#skittlize!(options = {}) ⇒ Object



17
18
19
# File 'lib/skittlize.rb', line 17

def skittlize!(options = {})
  replace(skittlize(options))
end