Class: RoadForest::TypeHandlers::RDFaWriter::ObjectAffordanceDecorator
- Inherits:
-
AffordanceDecorator
- Object
- EnvironmentDecorator
- AffordanceDecorator
- RoadForest::TypeHandlers::RDFaWriter::ObjectAffordanceDecorator
- Defined in:
- lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb
Constant Summary
Constants included from AffordanceClient
Instance Attribute Summary
Attributes inherited from EnvironmentDecorator
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AffordanceDecorator
#affordance?, #graph, #rdfpost_curie, #template_kinds
Methods included from AffordanceClient
#affordance_node?, #affordance_present, #affordance_type_in_graph?, #affordances_in_graph?, #all_affordances, #has_affordance, #parameterized_navigation_affordance_in_graph?, #payload_has_param, #query_matches
Methods inherited from EnvironmentDecorator
decorates, #initialize, #like_a?, perhaps_decorate, registry_purpose, #setup
Methods included from Utility::ClassRegistry::Registrar
#all_names, extended, #get, #map_classes, #register, #registry
Constructor Details
This class inherits a constructor from RoadForest::TypeHandlers::RDFaWriter::EnvironmentDecorator
Class Method Details
.can_decorate?(env) ⇒ Boolean
286 287 288 289 290 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 286 def self.can_decorate?(env) return false unless env._base_env_.class <= ObjectEnvironment return false unless env.parent.like_a? AffordanceDecorator return true end |
Instance Method Details
#input_attrs(value) ⇒ Object
302 303 304 305 306 307 308 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 302 def input_attrs(value) @_decorated_.attrs.merge( :name => "ol", :content => value, :value => value, ) end |
#label_attrs ⇒ Object
292 293 294 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 292 def label_attrs {} end |
#type_uri ⇒ Object
296 297 298 299 300 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 296 def type_uri if object.literal? and object.datatype? object.datatype end end |