|
|
|
|
|
by ezekg
1107 days ago
|
|
Refinements would be more useful if you could expose the refinements, but currently you can't. module HashExts
refine Hash do
def symbolize_values = transform_values { _1.to_sym }
end
end
module Test
using HashExts
def self.new_h = Hash.new
end
puts Test.new_h.symbolize_values
# => undefined method `symbolize_values' for {}:Hash (NoMethodError)
|
|
As far as I know the teething issues around refinements are ironed out but they remain an obscurity.