Module: GorillaPatch::Quantity
- Defined in:
- lib/gorilla-patch/quantity.rb
Overview
Refine String class by Sequel Inflections
Class Method Summary collapse
Class Method Details
.from_sequel ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/gorilla-patch/quantity.rb', line 4 def self.from_sequel @from_sequel ||= Module.new do require 'sequel' refine String do Sequel::Inflections.private_instance_methods.each do |method| define_method method do Sequel::Inflections.instance_method(method).bind(self).call(self) end end end end end |