def method name(argument)
#formula
end
Available from Ruby 3 (planned)
def method name(argument) = #formula
Receiver.Method name(argument)
Proc
Proc.new{|argument|formula}
proc{|argument|formula}
Object of Symbol or Hash or Method class.to_proc[argument]
lambda
lambda{|argument|formula}
-> (argument){formula}
Receiver[argument]
Receiver.(argument)
Receiver.call(argument)
Receiver.yield(argument)
Receiver=== #argument
Receiver.method(Method name Symbol or String)
Receiver[variable]
Receiver.(variable){formula}
Receiver.call(variable){formula}
Receiver===variable
Recommended Posts