Skip to content

Instantly share code, notes, and snippets.

@notyy
Created July 16, 2012 13:20
Show Gist options
  • Save notyy/3122675 to your computer and use it in GitHub Desktop.
Save notyy/3122675 to your computer and use it in GitHub Desktop.
scala_lecture,ruby comparation5
def match_type param
if param.kind_of? Integer
puts "it's a Integer"
end
if param.kind_of? String
puts "its a String"
end
if param.kind_of? Array
puts "its an Array"
end
end
match_type("abc")
match_type(1)
match_type([1,2,3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment