KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a method, that should accept maximum 2 arguments. Its code is like this: def method (*args) if args.length < 3 then puts args.collect else puts "Enter correct number of arguments" end end Is there more elegant way to specify it?
Tags (comma-separated)
Save Edits
Cancel