Class: RoadForest::TypeHandlers::RDFaWriter::DecorationSet

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDecorationSet

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

#namesObject

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