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.
8 9 10 11 |
# File 'lib/gtfs_engine/sources.rb', line 8 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
13 14 15 16 17 18 |
# File 'lib/gtfs_engine/sources.rb', line 13 def method_missing(name, &block) @config.sources.__send__(name).tap do |source| add_default_importers(source) source.instance_exec(source, &block) if ::Kernel.block_given? end end |