Skip to content
Browse files

Yard updates.

  • Loading branch information...
1 parent ea261b6 commit bdc8e8d55a926264c144eb1fe09ad007f66fff86 @gkellogg gkellogg committed Nov 29, 2012
View
10 History.markdown
@@ -15,7 +15,7 @@
### 0.3.11
* Up to date with RDFa Proposed Recomendation versions of specs.
-* Fix problems with @resource=[] or @about=[], which should be ignored and use the next most appropriate attribute.
+* Fix problems with @resource=\[\] or @about=\[\], which should be ignored and use the next most appropriate attribute.
* Remove support for @data, which was previously a synonym for @src in HTML5.
* More robust detection of XHTML1 if version is rdfa1.0
* Support change to remove @rel/@rev elements that aren't CURIES or IRIs when in the presense of @property
@@ -49,8 +49,8 @@
* Don't default xhtml1 and rdfa1.1 in parser; depend on host_detect.
* Use separate context documents for XML, XHTML and HTML.
* Remove Facet gem, which was causing problems with Active Record.
- * Added full support for HTML5 <time> element.
- * Added support for HTML5 <data> element with @value attribute to create a plain literal with possible language.
+ * Added full support for HTML5 &lt;time&gt; element.
+ * Added support for HTML5 &lt;data&gt; element with @value attribute to create a plain literal with possible language.
* Change vocabulary expansion rules to use OWL 2 RL entailment.
* Terms can now include a '/', to allow for use with @vocab where the class/property is a relative IRI.
* In writer:
@@ -79,9 +79,9 @@
* Add rdfa:hasVocabulary when encountering @vocab
* Implemented Reader#expand to perform vocabulary expansion using RDFS rules 5, 7, 9 and 11.
* Support for RDF collections (rdf:List) using @member attribute.
- *Implemented :expand option to reader, which allows normal use of reader interface without requiring the use of the #expand method.
+ * Implemented :expand option to reader, which allows normal use of reader interface without requiring the use of the #expand method.
* Add caches for popular vocabularies to speed load time.
- Add :vocabulary_profile as Reader option to allow for use of persistent vocabulary caches.
+ * Add :vocabulary_profile as Reader option to allow for use of persistent vocabulary caches.
* Performance improvements by evaluating debug statements in block only when debug enabled.
### 0.3.5
View
13 README.markdown
@@ -279,11 +279,11 @@ use the same prefix definitions found during parsing:
puts graph.dump(:rdfa, :prefixes => prefixes)
### Template-based Writer
-The RDFa writer uses [Haml][Haml] templates for code generation. This allows fully
-customizable RDFa output in a variety of host languages.
-The [default template]({RDF::RDFa::Writer::DEFAULT_HAML}) generates human readable HTML5
-output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML, which is not
-intended for human consumption.
+The RDFa writer uses [Haml][Haml] templates for code generation. This allows
+fully customizable RDFa output in a variety of host languages. The [default
+template]({RDF::RDFa::Writer::DEFAULT_HAML}) generates human readable HTML5
+output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML,
+which is not intended for human consumption.
To specify an alternative Haml template, consider the following:
@@ -437,7 +437,7 @@ Full documentation available on [Rubydoc.info][RDFa doc]
* [RDF.rb][RDF.rb]
* [Distiller](http://rdf.greggkellogg.net/distiller)
* [Documentation][RDFa doc]
-* [History]{file:History.markdown}
+* [History](file:History.markdown)
* [RDFa 1.1 Core][RDFa 1.1 Core]
* [XHTML+RDFa 1.1][XHTML+RDFa 1.1]
* [RDFa-test-suite](http://rdfa.info/test-suite/ "RDFa test suite")
@@ -487,3 +487,4 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
[RDFa doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfa/frames
[Haml]: http://haml-lang.com/
[Turtle]: http://www.w3.org/TR/2011/WD-turtle-20110809/
+[Backports]: http://rubygems.org/gems/backports
View
2 VERSION
@@ -1 +1 @@
-0.3.15
+0.3.16
View
2 example-files/core.html
@@ -475,7 +475,7 @@
pre.sh_sourceCode .sh_attribute { color: #006400; }
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-PR" rel="stylesheet" type="text/css" charset="utf-8" /></head>
- <body><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a></p><h1 property="dcterms:title" class="title" id="title">RDFa Core 1.1</h1><h2 property="bibo:subtitle" id="subtitle">Syntax and processing rules for embedding RDF through attributes</h2><h2 property="dcterms:issued" datatype="xsd:dateTime" content="2012-05-08T05:00:00+0000" id="w3c-proposed-recommendation-08-may-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Proposed Recommendation 08 May 2012</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/rdfa-core/">http://www.w3.org/TR/rdfa-core/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2010/02/rdfa/drafts#rdfa-core">http://www.w3.org/2010/02/rdfa/drafts#rdfa-core</a></dd><dt>Previous version:</dt><dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/">http://www.w3.org/TR/2012/CR-rdfa-core-20120313/</a></dd><dt>Latest recommendation:</dt><dd><a href="http://www.w3.org/TR/rdfa-syntax/">http://www.w3.org/TR/rdfa-syntax/</a></dd><dt>Editors:</dt><dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Ben Adida</span>, Creative Commons, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net</a></span> </span>
+ <body><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a></p><h1 property="dcterms:title" class="title" id="title">RDFa Core 1.1</h1><h2 property="bibo:subtitle" id="subtitle">Syntax and processing rules for embedding RDF through attributes</h2><h2 property="dcterms:issued" datatype="xsd:dateTime" content="2012-05-08T05:00:00+0000" id="w3c-proposed-recommendation-08-may-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Proposed Recommendation 08 May 2012</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/rdfa-core/">http://www.w3.org/TR/rdfa-core/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2010/02/rdfa/drafts#rdfa-core">http://www.w3.org/2010/02/rdfa/drafts#rdfa-core</a></dd><dt>Previous version:</dt><dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest recommendation:</dt><dd><a href="http://www.w3.org/TR/rdfa-syntax/">http://www.w3.org/TR/rdfa-syntax/</a></dd><dt>Editors:</dt><dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Ben Adida</span>, Creative Commons, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net</a></span> </span>
</dd>
<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span>, webBackplane, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com</a></span> </span>
</dd>
View
2 example-files/core.ttl
@@ -124,7 +124,7 @@
<http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/>,
<http://www.w3.org/TR/2008/REC-xml-20081126/>,
<http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/>;
- dcterms:replaces <http://www.w3.org/TR/2012/CR-rdfa-core-20120313/>;
+ dcterms:replaces <http://www.w3.org/TR/2012/REC-rdfa-core-20120607/>;
dcterms:requires <http://www.w3.org/TR/2009/REC-owl2-overview-20091027/>,
<http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/>,
<http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/>,
View
2 lib/rdf/rdfa.rb
@@ -17,7 +17,7 @@ module RDF
#
# @see http://rubygems.org/gems/rdf
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
- # @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/
+ # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
# @see http://dev.w3.org/html5/rdfa/
#
View
2 lib/rdf/rdfa/expansion.rb
@@ -10,7 +10,7 @@ module Expansion
##
# Perform vocabulary expansion on the resulting default graph.
#
- # Vocabulary expansion relies on a sub-set of OWL [OWL2-PROFILES] entailment to add
+ # Vocabulary expansion relies on a sub-set of OWL entailment to add
# triples to the default graph based on rules and property/class relationships
# described in referenced vocabularies.
#
View
8 lib/rdf/rdfa/reader.rb
@@ -21,7 +21,7 @@ module RDF::RDFa
#
# Based on processing rules described here:
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
- # @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/
+ # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
# @see http://dev.w3.org/html5/rdfa/
#
@@ -61,11 +61,11 @@ class Reader < RDF::Reader
Regexp::EXTENDED)
# This expression matches an term as defined in
- # [RDFA-CORE](# @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/#s_terms)
+ # [RDFA-CORE](http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms)
#
# For the avoidance of doubt, this definition means a 'term'
# in RDFa is an XML NCName that also permits slash as a non-leading character.
- # @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/#s_terms
+ # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms
TERM_REGEXP = Regexp.new(
%{^
(?!\\\\u0301) # &#x301; is a non-spacing acute accent.
@@ -253,7 +253,7 @@ def inspect
# @yield [reader] `self`
# @yieldparam [RDF::Reader] reader
# @yieldreturn [void] ignored
- # @raise [Error]:: Raises RDF::ReaderError if _validate_
+ # @raise [RDF::ReaderError] if _validate_
def initialize(input = $stdin, options = {}, &block)
super do
@debug = options[:debug]
View
6 lib/rdf/rdfa/reader/nokogiri.rb
@@ -26,7 +26,7 @@ def initialize(node, parent = nil)
##
# Element language
#
- # From HTML5 [3.2.3.3]
+ # From HTML5 3.2.3.3
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
# on an element, user agents must use the lang attribute in the XML namespace, and the lang
# attribute in no namespace must be ignored for the purposes of determining the element's
@@ -140,8 +140,8 @@ def initialize(node_set, parent)
##
# Return a proxy for each child
#
- # @yield(child)
- # @yieldparam(NodeProxy)
+ # @yield child
+ # @yieldparam [NodeProxy]
def each
@node_set.each do |c|
yield NodeProxy.new(c, parent)
View
8 lib/rdf/rdfa/reader/rexml.rb
@@ -28,7 +28,7 @@ def initialize(node, parent = nil)
##
# Element language
#
- # From HTML5 [3.2.3.3]
+ # From HTML5 3.2.3.3
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
# on an element, user agents must use the lang attribute in the XML namespace, and the lang
# attribute in no namespace must be ignored for the purposes of determining the element's
@@ -143,7 +143,7 @@ def xpath(*args)
end
end
- # Simple case for <script>
+ # Simple case for &lt;script&gt;
def css(path)
xpath("//script[@type]")
end
@@ -169,8 +169,8 @@ def initialize(node_set, parent)
##
# Return a proxy for each child
#
- # @yield(child)
- # @yieldparam(NodeProxy)
+ # @yield child
+ # @yieldparam [NodeProxy]
def each
@node_set.each do |c|
yield NodeProxy.new(c, parent)
View
180 lib/rdf/rdfa/writer.rb
@@ -3,51 +3,47 @@
module RDF::RDFa
##
- # An RDFa 1.1 serialiser in Ruby. The RDFa serializer makes use of Haml templates,
- # allowing runtime-replacement with alternate templates. Note, however, that templates
- # should be checked against the W3C test suite to ensure that valid RDFa is emitted.
+ # An RDFa 1.1 serialiser in Ruby. The RDFa serializer makes use of Haml templates, allowing runtime-replacement with alternate templates. Note, however, that templates should be checked against the W3C test suite to ensure that valid RDFa is emitted.
#
- # Note that the natural interface is to write a whole graph at a time.
- # Writing statements or Triples will create a graph to add them to
- # and then serialize the graph.
+ # Note that the natural interface is to write a whole graph at a time. Writing statements or Triples will create a graph to add them to and then serialize the graph.
#
# The writer will add prefix definitions, and use them for creating @prefix definitions, and minting CURIEs
#
# @example Obtaining a RDFa writer class
- # RDF::Writer.for(:html) #=> RDF::RDFa::Writer
- # RDF::Writer.for("etc/test.html")
- # RDF::Writer.for(:file_name => "etc/test.html")
- # RDF::Writer.for(:file_extension => "html")
- # RDF::Writer.for(:content_type => "application/xhtml+xml")
- # RDF::Writer.for(:content_type => "text/html")
+ # RDF::Writer.for(:html) => RDF::RDFa::Writer
+ # RDF::Writer.for("etc/test.html")
+ # RDF::Writer.for(:file_name => "etc/test.html")
+ # RDF::Writer.for(:file_extension => "html")
+ # RDF::Writer.for(:content_type => "application/xhtml+xml")
+ # RDF::Writer.for(:content_type => "text/html")
#
# @example Serializing RDF graph into an XHTML+RDFa file
- # RDF::RDFa::Write.open("etc/test.html") do |writer|
- # writer << graph
- # end
+ # RDF::RDFa::Write.open("etc/test.html") do |writer|
+ # writer << graph
+ # end
#
# @example Serializing RDF statements into an XHTML+RDFa file
- # RDF::RDFa::Writer.open("etc/test.html") do |writer|
- # graph.each_statement do |statement|
- # writer << statement
+ # RDF::RDFa::Writer.open("etc/test.html") do |writer|
+ # graph.each_statement do |statement|
+ # writer << statement
+ # end
# end
- # end
#
# @example Serializing RDF statements into an XHTML+RDFa string
- # RDF::RDFa::Writer.buffer do |writer|
- # graph.each_statement do |statement|
- # writer << statement
+ # RDF::RDFa::Writer.buffer do |writer|
+ # graph.each_statement do |statement|
+ # writer << statement
+ # end
# end
- # end
#
# @example Creating @base and @prefix definitions in output
- # RDF::RDFa::Writer.buffer(:base_uri => "http://example.com/", :prefixes => {
- # :foaf => "http://xmlns.com/foaf/0.1/"}
- # ) do |writer|
- # graph.each_statement do |statement|
- # writer << statement
+ # RDF::RDFa::Writer.buffer(:base_uri => "http://example.com/", :prefixes => {
+ # :foaf => "http://xmlns.com/foaf/0.1/"}
+ # ) do |writer|
+ # graph.each_statement do |statement|
+ # writer << statement
+ # end
# end
- # end
#
# @author [Gregg Kellogg](http://kellogg-assoc.com/)
class Writer < RDF::Writer
@@ -57,8 +53,7 @@ class Writer < RDF::Writer
# @return [Array<URI>]
attr :top_classes
- # Defines order of predicates to to emit at begninning of a resource description. Defaults to
- # [rdf:type, rdfs:label, dc:title]
+ # Defines order of predicates to to emit at begninning of a resource description. Defaults to `[rdf:type, rdfs:label, dc:title]`
# @return [Array<URI>]
attr :predicate_order
@@ -99,11 +94,9 @@ class Writer < RDF::Writer
# Defines order of predicates to to emit at begninning of a resource description..
# @option options [Array<RDF::URI>] :heading_predicates ([RDF::RDFS.label, RDF::DC.title])
# Defines order of predicates to use in heading.
- # @option options [String, Symbol, Hash{Symbol => String}] :haml (DEFAULT_HAML)
- # HAML templates used for generating code
+ # @option options [String, Symbol, Hash{Symbol => String}] :haml (DEFAULT_HAML) HAML templates used for generating code
# @option options [Hash] :haml_options (HAML_OPTIONS)
- # Options to pass to Haml::Engine.new. Default options set :ugly => false
- # to ensure that whitespace in literals with newlines is properly preserved.
+ # Options to pass to Haml::Engine.new. Default options set `:ugly => false` to ensure that whitespace in literals with newlines is properly preserved.
# @yield [writer]
# @yieldparam [RDF::Writer] writer
def initialize(output = $stdout, options = {}, &block)
@@ -202,22 +195,7 @@ def write_epilogue
protected
- # Render document using haml_template[:doc].
- # Yields each subject to be rendered separately.
- #
- # The default Haml template is:
- # !!! XML
- # !!! 5
- # %html{:xmlns => "http://www.w3.org/1999/xhtml", :lang => lang, :prefix => prefix}
- # - if base || title
- # %head
- # - if base
- # %base{:href => base}
- # - if title
- # %title= title
- # %body
- # - subjects.each do |subject|
- # != yield(subject)
+ # Render document using `haml_template[:doc]`. Yields each subject to be rendered separately.
#
# @param [Array<RDF::Resource>] subjects
# Ordered list of subjects. Template must yield to each subject, which returns
@@ -252,28 +230,11 @@ def render_document(subjects, options = {})
end
end
- # Render a subject using haml_template[:subject].
- #
- # The _subject_ template may be called either as a top-level element, or recursively under another element
- # if the _rel_ local is not nil.
- #
- # Yields each predicate/property to be rendered separately (@see #render_property_value and
- # {#render_property_values}).
+ # Render a subject using `haml_template[:subject]`.
#
- # The default Haml template is:
- # - if element == :li
- # %li{:rel => rel, :resource => (about || resource), :typeof => typeof, :inlist => inlist}
- # - if typeof
- # %span.type!= typeof
- # - predicates.each do |predicate|
- # != yield(predicate)
- # - else
- # %div{:rel => rel, :resource => (about || resource), :typeof => typeof, :inlist => inlist}
- # - if typeof
- # %span.type!= typeof
- # - predicates.each do |predicate|
- # != yield(predicate)
+ # The _subject_ template may be called either as a top-level element, or recursively under another element if the _rel_ local is not nil.
#
+ # Yields each predicate/property to be rendered separately (@see #render_property_value and `#render_property_values`).
#
# @param [Array<RDF::Resource>] subject
# Subject to render
@@ -292,7 +253,7 @@ def render_document(subjects, options = {})
# RDF type as a CURIE, URI or Node definition.
# If :about is nil, this defaults to the empty string ("").
# @option options [:li, nil] element (nil)
- # Render with <li>, otherwise with template default.
+ # Render with &lt;li&gt;, otherwise with template default.
# @option options [String] haml (haml_template[:subject])
# Haml template to render.
# @yield [predicate]
@@ -301,7 +262,7 @@ def render_document(subjects, options = {})
# @yieldreturn [:ignored]
# @return String
# The rendered document is returned as a string
- # Return Haml template for document from haml_template[:subject]
+ # Return Haml template for document from `haml_template[:subject]`
def render_subject(subject, predicates, options = {})
template = options[:haml] || :subject
options = {
@@ -320,62 +281,17 @@ def render_subject(subject, predicates, options = {})
end
end
- # Render a single- or multi-valued predicate using haml_template[:property_value] or haml_template[:property_values].
- # Yields each object for optional rendering. The block should only
- # render for recursive subject definitions (i.e., where the object
- # is also a subject and is rendered underneath the first referencing subject).
- #
- # The default Haml template for a single-valued property is:
- # - if heading_predicates.include?(predicate) && object.literal?
- # %h1{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
- # - else
- # %div.property
- # %span.label
- # = get_predicate_name(predicate)
- # - if res = yield(object)
- # != res
- # - elsif get_curie(object) == 'rdf:nil'
- # %span{:rel => get_curie(predicate), :inlist => ''}
- # - elsif object.node?
- # %span{:property => get_curie(predicate), :resource => get_curie(object), :inlist => inlist}= get_curie(object)
- # - elsif object.uri?
- # %a{:property => get_curie(predicate), :href => object.to_s, :inlist => inlist}= object.to_s
- # - elsif object.datatype == RDF.XMLLiteral
- # %span{:property => get_curie(predicate), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}<!= get_value(object)
- # - else
- # %span{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
- #
- #
- # The default Haml template for a multi-valued property is:
- # %div.property
- # %span.label
- # = get_predicate_name(predicate)
- # %ul
- # - objects.each do |object|
- # - if res = yield(object)
- # != res
- # - elsif object.node?
- # %li{:property => get_curie(predicate), :resource => get_curie(object), :inlist => inlist}= get_curie(object)
- # - elsif object.uri?
- # %li
- # %a{:property => get_curie(predicate), :href => object.to_s, :inlist => inlist}= object.to_s
- # - elsif object.datatype == RDF.XMLLiteral
- # %li{:property => get_curie(predicate), :lang => get_lang(object), :datatype => get_curie(object.datatype), :inlist => inlist}<!= get_value(object)
- # - else
- # %li{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
+ # Render a single- or multi-valued predicate using `haml_template[:property_value]` or `haml_template[:property_values]`. Yields each object for optional rendering. The block should only render for recursive subject definitions (i.e., where the object is also a subject and is rendered underneath the first referencing subject).
#
- # If a multi-valued property definition is not found within the template,
- # the writer will use the single-valued property definition multiple times.
+ # If a multi-valued property definition is not found within the template, the writer will use the single-valued property definition multiple times.
#
# @param [Array<RDF::Resource>] predicate
# Predicate to render.
# @param [Array<RDF::Resource>] objects
- # List of objects to render.
- # If the list contains only a single element, the :property_value template will be used.
- # Otherwise, the :property_values template is used.
+ # List of objects to render. If the list contains only a single element, the :property_value template will be used. Otherwise, the :property_values template is used.
# @param [Hash{Symbol => Object}] options Rendering options passed to Haml render.
# @option options [String] haml (haml_template[:property_value], haml_template[:property_values])
- # Haml template to render. Otherwise, uses haml_template[:property_value] or haml_template[:property_values]
+ # Haml template to render. Otherwise, uses `haml_template[:property_value] or haml_template[:property_values]`
# depending on the cardinality of objects.
# @yield [object]
# Yields object.
@@ -523,8 +439,7 @@ def order_properties(properties)
prop_list
end
- # Perform any statement preprocessing required. This is used to perform reference counts and determine required
- # prefixes.
+ # Perform any statement preprocessing required. This is used to perform reference counts and determine required prefixes.
# @param [RDF::Statement] statement
# @return [ignored]
def preprocess_statement(statement)
@@ -551,21 +466,20 @@ def reset
# Display a subject.
#
- # If the Haml template contains an entry matching the subject's rdf:type URI,
- # that entry will be used as the template for this subject and it's properties.
+ # If the Haml template contains an entry matching the subject's rdf:type URI, that entry will be used as the template for this subject and it's properties.
#
# @example Displays a subject as a Resource Definition:
- # <div typeof="rdfs:Resource" about="http://example.com/resource">
- # <h1 property="dc:title">label</h1>
- # <ul>
- # <li content="2009-04-30T06:15:51Z" property="dc:created">2009-04-30T06:15:51+00:00</li>
- # </ul>
- # </div>
+ # <div typeof="rdfs:Resource" about="http://example.com/resource">
+ # <h1 property="dc:title">label</h1>
+ # <ul>
+ # <li content="2009-04-30T06:15:51Z" property="dc:created">2009-04-30T06:15:51+00:00</li>
+ # </ul>
+ # </div>
#
# @param [RDF::Resource] subject
# @param [Hash{Symbol => Object}] options
# @option options [:li, nil] :element(:div)
- # Serialize using <li> rather than template default element
+ # Serialize using &lt;li&gt; rather than template default element
# @option options [RDF::Resource] :rel (nil)
# Optional @rel property
# @return [Nokogiri::XML::Element, {Namespace}]

0 comments on commit bdc8e8d

Please sign in to comment.
Something went wrong with that request. Please try again.