rosa-build/vendor/gems/rails-assets-notifyjs-0.4.2/lib/rails-assets-notifyjs.rb

47 lines
727 B
Ruby
Raw Normal View History

2020-01-22 11:07:00 +00:00
require "rails-assets-notifyjs/version"
module RailsAssetsNotifyjs
def self.gem_path
Pathname(File.realpath(__FILE__)).join('../..')
end
def self.gem_spec
Gem::Specification::load(
gem_path.join("rails-assets-notifyjs.gemspec").to_s
)
end
def self.load_paths
gem_path.join('app/assets').each_child.to_a
end
def self.dependencies
[
]
end
if defined?(Rails)
class Engine < ::Rails::Engine
# Rails -> use app/assets directory.
end
end
end
class RailsAssets
@components ||= []
class << self
attr_accessor :components
def load_paths
components.flat_map(&:load_paths)
end
end
end
RailsAssets.components << RailsAssetsNotifyjs