lib/scrivito/model_library.rb in scrivito_sdk-0.50.1 vs lib/scrivito/model_library.rb in scrivito_sdk-0.60.0.rc1

- old
+ new

@@ -1,9 +1,9 @@ module Scrivito # -# @api private +# @api public # class ModelLibrary attr_reader :custom_pages, :custom_widgets, :custom_paths def initialize @@ -11,11 +11,11 @@ end # # Clears model cache. # - # @api private + # @api public # @see Scrivito.models # def clear_cache @pages = nil @widgets = nil @@ -23,42 +23,42 @@ end # # Configures which models Scrivito assumes as pages and widgets. # - # @api private + # @api public # @see Scrivito.models # def define(&block) DSL.new(self).instance_eval(&block) end # # Lists available page models. # - # @api private + # @api public # @see Scrivito.models # @return [Scrivito::ClassCollection] available page classes # def pages @pages ||= load_models('page', Scrivito::BasicObj) end # # Lists available widget models. # - # @api private + # @api public # @see Scrivito.models # @return [Scrivito::ClassCollection] available widget classes # def widgets @widgets ||= load_models('widget', Scrivito::BasicWidget) end # # Lists available paths to scan for models. # - # @api private + # @api public # @see Scrivito.models # @return [Array<String>] available paths to scan for models. # def paths @paths ||= (autoload_model_paths + custom_paths).map(&:to_s)