Sha256: e03c0afce582e94f2717e3eb31a5c6db42dea6eea3ae0defb9186c54d7f0e565
Contents?: true
Size: 682 Bytes
Versions: 6
Compression:
Stored size: 682 Bytes
Contents
class PeakFlowUtils::HandlersFinderService < PeakFlowUtils::ApplicationService def execute handlers = [] Dir.foreach("#{File.dirname(__FILE__)}/../../handlers/peak_flow_utils") do |file| match = file.match(/\A(.+)_handler\.rb\Z/) next unless match const_name_snake = "#{match[1]}_handler" next if const_name_snake == "application_handler" const_name_camel = const_name_snake.camelize handler = PeakFlowUtils::HandlerHelper.new( id: const_name_snake, const_name: const_name_camel, name: const_name_camel ) handlers << handler if handler.instance.enabled? end succeed! handlers end end
Version data entries
6 entries across 6 versions & 1 rubygems