lib/yard/templates/engine.rb in yard-0.4.0 vs lib/yard/templates/engine.rb in yard-0.5.0

- old
+ new

@@ -6,11 +6,11 @@ attr_accessor :template_paths # Registers a new template path in {template_paths} # # @param [String] path a new template path - # @return [nil] + # @return [void] def register_template_path(path) template_paths.push path end # Creates a template module representing the path. Searches on disk @@ -84,11 +84,11 @@ # documentation generation. # # @param [Array<CodeObjects::Base>] objects a list of {CodeObjects::Base} # objects to pass to the template # @param [Hash] options (see {render}) - # @return [nil] + # @return [void] def generate(objects, options = {}) set_default_options(options) options[:objects] = objects template(options[:template], :fulldoc, options[:format]).run(options) end @@ -116,10 +116,10 @@ # # @param [Hash] options the options hash # @option options [Symbol] :format (:text) the default format # @option options [Symbol] :type (nil) the :object's type, if provided # @option options [Symbol] :template (:default) the default template - # @return [nil] + # @return [void] def set_default_options(options = {}) options[:format] ||= :text options[:type] ||= options[:object].type if options[:object] options[:template] ||= :default end