Loading lib/jsduck/options.rb +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ module JsDuck validate @custom_tag_paths.each {|path| TagRegistry.load_from(path) } TagRegistry.options = self end def create_option_parser Loading lib/jsduck/tag/new.rb +9 −7 Original line number Diff line number Diff line Loading @@ -9,13 +9,15 @@ module JsDuck::Tag # Initializes the tooltip text. # # FIXME: Copy-pasted code from old Boolean tag class, doesn't # currently work as it's never called. def create_tooltip!(imports, new_since) if new_since @signature[:tooltip] = "New since #{new_since}" elsif imports.length > 0 @signature[:tooltip] = "New since #{imports.last[:version]}" # Gets passed the options object containing command line parameters. # # FIXME: This method is exclusively called only for this New tag # class. Figure out some way to generalize this. def options=(opts) if opts.new_since @signature[:tooltip] = "New since #{opts.new_since}" elsif opts.imports.length > 0 @signature[:tooltip] = "New since #{opts.imports.last[:version]}" end end Loading lib/jsduck/tag_registry.rb +5 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ module JsDuck def assets=(assets) @keys[:aside].assets = assets end # Passes command line options to @new tag def options=(opts) @keys[:new].options = opts end end end Loading
lib/jsduck/options.rb +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ module JsDuck validate @custom_tag_paths.each {|path| TagRegistry.load_from(path) } TagRegistry.options = self end def create_option_parser Loading
lib/jsduck/tag/new.rb +9 −7 Original line number Diff line number Diff line Loading @@ -9,13 +9,15 @@ module JsDuck::Tag # Initializes the tooltip text. # # FIXME: Copy-pasted code from old Boolean tag class, doesn't # currently work as it's never called. def create_tooltip!(imports, new_since) if new_since @signature[:tooltip] = "New since #{new_since}" elsif imports.length > 0 @signature[:tooltip] = "New since #{imports.last[:version]}" # Gets passed the options object containing command line parameters. # # FIXME: This method is exclusively called only for this New tag # class. Figure out some way to generalize this. def options=(opts) if opts.new_since @signature[:tooltip] = "New since #{opts.new_since}" elsif opts.imports.length > 0 @signature[:tooltip] = "New since #{opts.imports.last[:version]}" end end Loading
lib/jsduck/tag_registry.rb +5 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,11 @@ module JsDuck def assets=(assets) @keys[:aside].assets = assets end # Passes command line options to @new tag def options=(opts) @keys[:new].options = opts end end end