Class: Configuration::InclusionMatcher
- Inherits:
-
Object
- Object
- Configuration::InclusionMatcher
- Defined in:
- lib/httpimagestore/configuration/handler.rb
Instance Method Summary collapse
- #included?(request_state) ⇒ Boolean
-
#initialize(value, template) ⇒ InclusionMatcher
constructor
A new instance of InclusionMatcher.
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
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 |