lib/ralyxa.rb in ralyxa-1.5.2 vs lib/ralyxa.rb in ralyxa-1.6.0
- old
+ new
@@ -1,8 +1,36 @@
-require "ralyxa/version"
-require 'ralyxa/skill'
+require 'ralyxa/version'
+require 'ralyxa/configuration'
require 'ralyxa/register_intents'
+require 'ralyxa/skill'
module Ralyxa
+ class << self
+ attr_accessor :configuration
+
+ def configure
+ yield configuration if block_given?
+ end
+
+ def method_missing(m, *args, &block)
+ if configuration.respond_to?(m)
+ configuration.send(m, *args, &block)
+ else
+ super
+ end
+ end
+
+ def respond_to_missing?(m, include_private = false)
+ configuration.respond_to?(m) || super
+ end
+
+ private
+
+ def setup_configuration
+ @configuration = Ralyxa::Configuration.new
+ end
+ end
+
+ setup_configuration
end
-Ralyxa::RegisterIntents.run
\ No newline at end of file
+Ralyxa::RegisterIntents.run