lib/api_docs/configuration.rb in api_docs-0.0.4 vs lib/api_docs/configuration.rb in api_docs-1.0.0
- old
+ new
@@ -1,14 +1,19 @@
-module ApiDocs
- class Configuration
-
- # Where to find the folder with the yaml docs
- attr_accessor :yaml_docs_folder, :api_url
-
- # Configuration defaults
- def initialize
- @yaml_docs_folder = '/doc'
- @api_url = 'http://localhost:3000'
- end
+class ApiDocs::Configuration
+
+ # Where to find the folder with documentation files
+ attr_accessor :docs_path
+
+ # Controller that ApiDocs::DocsController inherits from
+ attr_accessor :base_controller
+
+ # Array of ignored attributes. Attributes that don't really change
+ # the content like timestamps.
+ attr_accessor :ignored_attributes
+ # Configuration defaults
+ def initialize
+ @docs_path = Rails.root.join('doc/api')
+ @base_controller = 'ApplicationController'
+ @ignored_attributes = %w(created_at updated_at)
end
end
\ No newline at end of file