Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

best ruby cheat sheet

def greeting(hello, *names) # *name is a splat argument, takes several parameters passed in an array
  return "#{hello}, #{names}"
end

start = greeting("Hi", "Justin", "Maria", "Herbert") # call a method by name

def name(variable=default)
  ### The last line in here get's returned by default
end
Source by github.com #
 
PREVIOUS NEXT
Tagged: #ruby #cheat #sheet
ADD COMMENT
Topic
Name
3+2 =