Sha256: 253fdbca22dec3b1b1bce5bd6b3fb99a300331a1d3b7255f02f6f9913559e664
Contents?: true
Size: 729 Bytes
Versions: 4
Compression:
Stored size: 729 Bytes
Contents
txt[ The =>[&[rubydoc]/Macro|@Glyph::Macro@] class also includes a few methods to check and store bookmarks and headers. Consider for example the following source code for the %>[anchor]: ] highlight[=ruby| macro :anchor do min_parameters 1 max_parameters 2 bookmark :id => param(0), :title => param(1), :file => @source_file @data[:id] = param 0 @data[:title] = param 1 render end =] txt[ The @bookmark?@ method can be used to check the existance of a particular ID within the whole document, while the @bookmark@ method is used to store bookmark IDs and titles. In a similar way, you can use @header?@ and @header@ methods to check the existance of headers within the documents or store new ones. ]
Version data entries
4 entries across 4 versions & 1 rubygems