Sha256: 21b5e7b3c26465a7b23c2306c983f6489c0833ec66cf7204ca8197bfa0a91ea7

Contents?: true

Size: 389 Bytes

Versions: 2

Compression:

Stored size: 389 Bytes

Contents

require 'lhc'

module LHS
end

Gem.find_files('lhs/**/*.rb').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

2 entries across 2 versions & 1 rubygems

Version Path
lhs-3.3.2 lib/lhs.rb
lhs-3.3.1 lib/lhs.rb