lib/light-service-ext.rb in light-service-ext-0.1.1 vs lib/light-service-ext.rb in light-service-ext-0.1.2

- old
+ new

@@ -1,16 +1,38 @@ # frozen_string_literal: true -require "light-service-ext/version" -require "light-service-ext/constants" -require "light-service-ext/regex" -require "light-service-ext/error_info" -require "light-service-ext/context_error" -require "light-service-ext/application_context" -require "light-service-ext/application_contract" -require "light-service-ext/around_action_execute_extension" -require "light-service-ext/application_action" -require "light-service-ext/all_actions_complete_action" -require "light-service-ext/application_validator_action" -require "light-service-ext/application_organizer" +%w[ +version +constants +regex +error_info +context_error +configuration +with_error_handler +application_context +application_contract +around_action_execute_extension +application_action +all_actions_complete_action +application_validator_action +application_organizer +].each do |filename| + require File.expand_path("../light-service-ext/#{filename}", Pathname.new(__FILE__).realpath) +end -module LightServiceExt; end + + +module LightServiceExt + class << self + def config + self.configuration + end + + def configuration + @configuration ||= Configuration.new + end + + def configure + yield configuration + end + end +end