Class: Utopia::Controller::Rewrite::Rule

Inherits:
Object
  • Object
show all
Defined in:
lib/utopia/controller/rewrite.rb

Overview

A abstract rule which can match against a request path.

Direct Known Subclasses

ExtractPrefixRule

Instance Method Summary collapse

Instance Method Details

#apply_match_to_context(match_data, context) ⇒ Object



41
42
43
44
45
# File 'lib/utopia/controller/rewrite.rb', line 41

def apply_match_to_context(match_data, context)
	match_data.names.each do |name|
		context.instance_variable_set("@#{name}", match_data[name])
	end
end