Class: RoadForest::TypeHandlers::RDFaWriter::RDFPostCurie
- Inherits:
-
RenderEnvironment
- Object
- RenderEnvironment
- RoadForest::TypeHandlers::RDFaWriter::RDFPostCurie
- Defined in:
- lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Attributes inherited from RenderEnvironment
#_engine, #heading_predicates, #lang, #parent
Instance Method Summary collapse
- #curie ⇒ Object
-
#initialize(engine, kind, uri) ⇒ RDFPostCurie
constructor
A new instance of RDFPostCurie.
- #prefix ⇒ Object
- #reduced? ⇒ Boolean
- #suffix ⇒ Object
- #template_kinds ⇒ Object
Methods inherited from RenderEnvironment
#_base_env_, #add_debug, #escape_entities, #get_content, #get_curie, #get_dt_curie, #get_lang, #get_predicate_name, #get_value, #inspect, #is_subject?, #like_a?, #list_property_envs, #literal?, #object_env, #render_checked, #simple_property_env, #subject_env, #yielded
Constructor Details
#initialize(engine, kind, uri) ⇒ RDFPostCurie
Returns a new instance of RDFPostCurie.
149 150 151 152 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 149 def initialize(engine, kind, uri) super(engine) @kind, @uri = kind, uri end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
154 155 156 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 154 def kind @kind end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
154 155 156 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 154 def uri @uri end |
Instance Method Details
#curie ⇒ Object
156 157 158 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 156 def curie @curie ||= get_curie(uri) end |
#prefix ⇒ Object
164 165 166 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 164 def prefix @prefix ||= curie.split(":").first end |
#reduced? ⇒ Boolean
160 161 162 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 160 def reduced? curie != uri end |
#suffix ⇒ Object
168 169 170 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 168 def suffix @suffix ||= curie.split(":").last end |
#template_kinds ⇒ Object
172 173 174 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 172 def template_kinds %w{rdfpost-curie} end |