Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def some_method(*what)
- case what
- when :a then puts "a"
- when :b then puts "b"
- when :c then puts "c"
- else
- if what.is_a? Array
- what.each { |the_mode|
- puts the_mode.class
- some_method(the_mode)
- }
- end
- end
- end
- some_method(:a, :b, :c)
Add Comment
Please, Sign In to add comment