Sha256: ca1f08cfae9b442e99df035818d650047ee8b8eaa140adb3067e00f059270700
Contents?: true
Size: 532 Bytes
Versions: 15
Compression:
Stored size: 532 Bytes
Contents
module JobNotifier module Adapters def names dir = Engine.root.join("app", "assets", "javascripts", "job_notifier") files = Dir.entries(dir).select { |file| file.ends_with?(".js") } files.map { |file| file[0..-4] } end def get_adapter_path(adapter_name) raise JobNotifier::Error::InvalidAdapter.new unless names.include?(adapter_name) Engine.root.join("app", "assets", "javascripts", "job_notifier", "#{adapter_name}.js") end module_function :names, :get_adapter_path end end
Version data entries
15 entries across 15 versions & 1 rubygems