Class: RoadForest::TypeHandlers::RDFaWriter::DecorationSet
- Inherits:
-
Object
- Object
- RoadForest::TypeHandlers::RDFaWriter::DecorationSet
- Defined in:
- lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb
Instance Attribute Summary collapse
-
#names ⇒ Object
Returns the value of attribute names.
Instance Method Summary collapse
- #decoration_for(env) ⇒ Object
-
#initialize ⇒ DecorationSet
constructor
A new instance of DecorationSet.
Constructor Details
#initialize ⇒ DecorationSet
Returns a new instance of DecorationSet.
87 88 89 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 87 def initialize @names = EnvironmentDecorator.all_names end |
Instance Attribute Details
#names ⇒ Object
Returns the value of attribute names.
90 91 92 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 90 def names @names end |
Instance Method Details
#decoration_for(env) ⇒ Object
92 93 94 95 96 |
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 92 def decoration_for(env) names.inject(env) do |env, name| EnvironmentDecorator[name].perhaps_decorate(env) end end |