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.



180
181
182
183
# File 'lib/httpimagestore/configuration/handler.rb', line 180

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

Instance Method Details

#included?(request_state) ⇒ Boolean

Returns:

  • (Boolean)


185
186
187
188
# File 'lib/httpimagestore/configuration/handler.rb', line 185

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