Guest User

Untitled

a guest
Apr 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def some_method(*what)
  2. case what
  3. when :a then puts "a"
  4. when :b then puts "b"
  5. when :c then puts "c"
  6. else
  7. if what.is_a? Array
  8. what.each { |the_mode|
  9. puts the_mode.class
  10. some_method(the_mode)
  11. }
  12. end
  13. end
  14. end
  15.  
  16. some_method(:a, :b, :c)
Add Comment
Please, Sign In to add comment