class RoadForest::TypeHandlers::RDFaWriter::ObjectAffordanceDecorator

Public Class Methods

can_decorate?(env) click to toggle source
# 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

Public Instance Methods

input_attrs(value) click to toggle source
# 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() click to toggle source
# File lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb, line 292
def label_attrs
  {}
end
type_uri() click to toggle source
# 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