Method: Switch.add

Defined in:
lib/whatnot/switch.rb

.add(switch) ⇒ Object



18
19
20
21
22
23
# File 'lib/whatnot/switch.rb', line 18

def self.add(switch)
  switch.number = next_number
  all[switch.number] = switch
  inc_next_number!
  switch
end