Class: Configuration::OutputOK
- Inherits:
-
OutputText
- Object
- Scope
- OutputText
- Configuration::OutputOK
- Defined in:
- lib/httpimagestore/configuration/handler.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_control = nil) ⇒ OutputOK
constructor
A new instance of OutputOK.
Methods inherited from OutputText
Methods inherited from Scope
node_parsers, #parse, register_node_parser
Constructor Details
#initialize(cache_control = nil) ⇒ OutputOK
Returns a new instance of OutputOK.
261 262 263 |
# File 'lib/httpimagestore/configuration/handler.rb', line 261 def initialize(cache_control = nil) super 'OK', 200, cache_control end |
Class Method Details
.match(node) ⇒ Object
251 252 253 |
# File 'lib/httpimagestore/configuration/handler.rb', line 251 def self.match(node) node.name == 'output_ok' end |
.parse(configuration, node) ⇒ Object
255 256 257 258 259 |
# File 'lib/httpimagestore/configuration/handler.rb', line 255 def self.parse(configuration, node) configuration.output and raise StatementCollisionError.new(node, 'output') cache_control = node.grab_attributes('cache-control').first configuration.output = OutputOK.new(cache_control) end |