Gorillib::Factory::EnumerableFactory
factory for converting keys
# File lib/gorillib/factories.rb, line 505 def initialize(options={}) @keys_factory = Gorillib::Factory( options.delete(:keys){ Gorillib::Factory(:identical) } ) super(options) end
# File lib/gorillib/factories.rb, line 510 def convert(obj) hsh = empty_product obj.each_pair do |key, val| hsh[keys_factory.receive(key)] = items_factory.receive(val) end hsh end
[Validate]
Generated with the Darkfish Rdoc Generator 2.