Module | YARD::Templates::Helpers::HtmlHelper |
In: |
lib/yard/templates/helpers/html_helper.rb
|
The helper module for HTML templates.
@param [CodeObjects::Base] object the object to get an anchor for @return [String] the anchor for a specific object
Returns the current character set. The default value can be overridden by setting the LANG environment variable or by overriding this method. In Ruby 1.9 you can also modify this value by setting +Encoding.default_external+.
@return [String] the current character set @since 0.5.4
Formats a list of objects and links them @return [String] a formatted list of objects
Formats a list of types from a tag.
@param [Array<String>, FalseClass] typelist
the list of types to be formatted.
@param [Boolean] brackets omits the surrounding
brackets if +brackets+ is set to +false+.
@return [String] the list of types formatted
as [Type1, Type2, ...] with the types linked to their respective descriptions.
Highlights Ruby source. Similar to {html_syntax_highlight}, but this method is meant to be called from {htmlify} when markup is set to "ruby".
@param [String] source the Ruby source @return [String] the highlighted HTML @since 0.7.0
Syntax highlights source in language type.
@note To support a specific language type, implement the method
+html_syntax_highlight_TYPE+ in this class.
@param [String] source the source code to highlight @param [Symbol, String] type the language type (:ruby, :plain, etc). Use
:plain for no syntax highlighting.
@return [String] the highlighted source
Resolves any text in the form of +{Name}+ to the object specified by Name. Also supports link titles in the form +{Name title}+.
@example Linking to an instance method
resolve_links("{MyClass#method}") # => "<a href='...'>MyClass#method</a>"
@example Linking to a class with a title
resolve_links("{A::B::C the C class}") # => "<a href='...'>the c class</a>"
@param [String] text the text to resolve links in @return [String] HTML with linkified references
Formats the signature of method meth.
@param [CodeObjects::MethodObject] meth the method object to list
the signature of
@param [Boolean] link whether to link the method signature to the details view @param [Boolean] show_extras whether to show extra meta-data (visibility, attribute info) @param [Boolean] full_attr_name whether to show the full attribute name
("name=" instead of "name")
Get the return types for a method signature.
@param [CodeObjects::MethodObject] meth the method object @param [Boolean] link whether to link the types @return [String] the signature types @since 0.5.3
Returns the URL for an object.
@param [String, CodeObjects::Base] obj the object (or object path) to link to @param [String] anchor the anchor to link to @param [Boolean] relative use a relative or absolute link @return [String] the URL location of the object
Returns the URL for a specific file
@param [String, CodeObjects::ExtraFileObject] filename the filename to link to @param [String] anchor optional anchor @return [String] the URL pointing to the file
Returns the URL for the frameset page
@return [String] the URL pointing to the frames page @since 0.8.0
Returns the URL for the alphabetic index page
@return [String] the URL pointing to the first main page the
user should see.
Returns the URL for the main page (README or alphabetic index)
@return [String] the URL pointing to the first main page the
user should see.