Sha256: c6ad6e24b554de8400cffaab706e24959aad9332419394d093d36bd9584cbf78

Contents?: true

Size: 394 Bytes

Versions: 4

Compression:

Stored size: 394 Bytes

Contents

require 'lhc'

module LHS
end

Gem.find_files('lhs/**/*.rb').sort.each { |path| require path }

# Preload all the LHS::Records that are defined in app/models
class Engine < Rails::Engine
  initializer 'Load all LHS::Records from app/models/**' do |app|
    Dir.glob(app.root.join('app/models/**/*.rb')).each do |file|
      require file if File.read(file).scan('LHS::Record')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lhs-3.4.0 lib/lhs.rb
lhs-3.3.6 lib/lhs.rb
lhs-3.3.5 lib/lhs.rb
lhs-3.3.3 lib/lhs.rb