Class: Configuration::HandlerStatement::ConditionalInclusion::ImageNameOn
- Inherits:
-
Object
- Object
- Configuration::HandlerStatement::ConditionalInclusion::ImageNameOn
- Defined in:
- lib/httpimagestore/configuration/handler/statement.rb
Instance Method Summary collapse
- #included?(request_state) ⇒ Boolean
-
#initialize(template) ⇒ ImageNameOn
constructor
A new instance of ImageNameOn.
Constructor Details
#initialize(template) ⇒ ImageNameOn
54 55 56 |
# File 'lib/httpimagestore/configuration/handler/statement.rb', line 54 def initialize(template) @template = template.to_template end |
Instance Method Details
#included?(request_state) ⇒ Boolean
58 59 60 61 |
# File 'lib/httpimagestore/configuration/handler/statement.rb', line 58 def included?(request_state) image_name = request_state[:image_name] @template.render(request_state).split(',').include? image_name end |