Public Instance methods
plugin(plugin, *args, &block)
Automatically refresh the instance variables used if the plugin sets instance variables.
[show source]
# File lib/roda/plugins/shape_friendly.rb 81 def plugin(plugin, *args, &block) 82 super 83 plugin = RodaPlugins.load_plugin(plugin) if plugin.is_a?(Symbol) 84 [ 85 [self, :SCOPE_INSTANCE_VARIABLES], 86 [self::RodaRequest, :REQUEST_INSTANCE_VARIABLES], 87 [self::RodaResponse, :RESPONSE_INSTANCE_VARIABLES], 88 ].each do |klass, ivs_const| 89 if plugin.const_defined?(ivs_const) 90 def_initialize_nil_instance_variables(klass, ivs_const) 91 end 92 end 93 nil 94 end