lib/swagger_engine/engine.rb in swagger_engine-0.0.1 vs lib/swagger_engine/engine.rb in swagger_engine-0.0.2
- old
+ new
@@ -5,6 +5,23 @@
initializer "swagger_engine.assets.precompile" do |app|
app.config.assets.precompile += %w(print.css reset.css)
end
end
-end
+
+ class Configuration
+ #[{ default: "swagger.json" }]
+ attr_accessor :json_files
+ end
+ class << self
+ attr_writer :configuration
+ end
+
+ module_function
+ def configuration
+ @configuration ||= Configuration.new
+ end
+
+ def configure
+ yield(configuration)
+ end
+ end