Previously, I asked about a clever way to execute a method on a given condition \"Ruby a clever way to execute a function on a condition.\"
The solutions and respons
a = ->(string="No string passed") do puts string end some_hash = { 0 => a } some_hash[0].call("Hello World") some_hash[0][]
a = ->(string="No string passed") do
puts string
end
some_hash = { 0 => a }
some_hash[0].call("Hello World")
some_hash[0][]