Module: R2::ShadowFlipper

Defined in:
lib/r2/shadow_flipper.rb

Class Method Summary collapse

Class Method Details

.flip(val) ⇒ Object



3
4
5
6
7
# File 'lib/r2/shadow_flipper.rb', line 3

def self.flip(val)
  val = replace_commas_in_parentheses(val)
  val = val.split(/\s*,\s*/).map { |shadow| single_shadow_swap(shadow) }.join(', ')
  restore_commas(val)
end