3 ms·
FYI .try takes a block. Passing a symbol is just shorthand, similar to how map(&:method) is shorthand for .map {|x| x.method } So technically you can pass argu
by hiharryhere 11y ago
FYI .try takes a block. Passing a symbol is just shorthand, similar to how map(&:method) is shorthand for .map {|x| x.method }
So technically you can pass arguments to a try method by doing object.try {|o| o.method(args) }
Not trying to be pedantic, hopefully being helpful.
- maniacalrobot 11y agoEveryday is a learning day!