lib/rgeo/feature/factory_generator.rb in rgeo-0.1.20 vs lib/rgeo/feature/factory_generator.rb in rgeo-0.1.21
- old
+ new
@@ -99,9 +99,17 @@
def call(config_={})
nil
end
+ # Return a new FactoryGenerator that always returns the given
+ # factory.
+
+ def self.single(factory_)
+ ::Proc.new{ |c_| factory_ }
+ end
+
+
# Return a new FactoryGenerator that calls the given delegate, but
# modifies the configuration passed to it. You can provide defaults
# for configuration values not explicitly specified, and you can
# force certain values to override the given configuration.