You can't have space betwen function and open bracket
This is wrong: hello (params)
(Notice the space !)
This is right: hello(params)
This is right: hello( params )
You can use ! and ? in function names:
def home?(person)
person.location == :home
end
home?(moshe)
def text(x)
puts "Hello #{x}"
end
This is legal: text('boris')
This is legal: text 'boris'
So when you see:
validate :something, { rule: 11 }
Its really like:
validate(:somethig, { rule: 11 }