Sha256: 4667661afdfd3b64e1951bef57382d10928dfa946aed671c992e0d0f94ea05b1

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

module GitDuplicator
  # Load all implemented services
  module Services
    Dir[File.dirname(__FILE__) + '/services/**/*.rb'].each do |file|
      # Get camelized class name
      filename = File.basename(file, '.rb')
      # Add _gateway suffix
      gateway_name = filename + '_repository'
      # Camelize the string to get the class name
      gateway_class = gateway_name.split('_').map(&:capitalize).join
      # Register for autoloading
      autoload gateway_class, file
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_duplicator-1.0.0 lib/git_duplicator/services.rb
git_duplicator-0.0.1 lib/git_duplicator/services.rb