Sha256: 50ffdf22de3c6fddaf35b0f997ec2123a49998d1154889ecd341158378b1b1b3

Contents?: true

Size: 353 Bytes

Versions: 2

Compression:

Stored size: 353 Bytes

Contents

module RailsImporter
  module Setup
    # Importer classes
    mattr_accessor :importers
    @@importers = []

    mattr_accessor :router_name
    @@router_name = :main_app

    def setup
      yield self if block_given?
    end

    def importer_class(importer_key)
      @@importers.select{|i| i.key.to_s == importer_key.to_s}.first
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_importer-0.2.0 lib/rails_importer/setup.rb
rails_importer-0.1.0 lib/rails_importer/setup.rb