Class: GtfsEngine::Sources
- Inherits:
- BasicObject
- Defined in:
- lib/gtfs_engine/sources.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Sources
constructor
A new instance of Sources.
- #method_missing(name, &block) ⇒ Object
Constructor Details
#initialize(config) ⇒ Sources
Returns a new instance of Sources.
20 21 22 23 |
# File 'lib/gtfs_engine/sources.rb', line 20 def initialize(config) @config = config @source_ids = ::Set.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, &block) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/gtfs_engine/sources.rb', line 25 def method_missing(name, &block) source = @config.sources.__send__ name add_default_importers source source.instance_exec source, &block if ::Kernel.block_given? source end |