Module: Configuration::HandlerStatement::ConditionalInclusion
- Defined in:
- lib/httpimagestore/configuration/handler.rb
Instance Method Summary collapse
- #excluded?(request_state) ⇒ Boolean
- #included?(request_state) ⇒ Boolean
- #inclusion_matcher(matcher) ⇒ Object
- #initialize(global, *args) ⇒ Object
Instance Method Details
#excluded?(request_state) ⇒ Boolean
241 242 243 |
# File 'lib/httpimagestore/configuration/handler.rb', line 241 def excluded?(request_state) not included? request_state end |
#included?(request_state) ⇒ Boolean
234 235 236 237 238 239 |
# File 'lib/httpimagestore/configuration/handler.rb', line 234 def included?(request_state) return true if @matchers.empty? @matchers.any? do |matcher| matcher.included?(request_state) end end |
#inclusion_matcher(matcher) ⇒ Object
230 231 232 |
# File 'lib/httpimagestore/configuration/handler.rb', line 230 def inclusion_matcher(matcher) @matchers << matcher end |
#initialize(global, *args) ⇒ Object
223 224 225 226 227 228 |
# File 'lib/httpimagestore/configuration/handler.rb', line 223 def initialize(global, *args) @matchers = [] matcher = args.pop @matchers << matcher if matcher super(global, *args) end |