Class: Configuration::InclusionMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/httpimagestore/configuration/handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, template) ⇒ InclusionMatcher

Returns a new instance of InclusionMatcher.



187
188
189
190
# File 'lib/httpimagestore/configuration/handler.rb', line 187

def initialize(value, template)
	@value = value
	@template = RubyStringTemplate.new(template) if template
end

Instance Method Details

#included?(request_state) ⇒ Boolean

Returns:

  • (Boolean)


192
193
194
195
# File 'lib/httpimagestore/configuration/handler.rb', line 192

def included?(request_state)
	return true if not @template
	@template.render(request_state).split(',').include? @value
end