Class: Configuration::Thumnailer
- Inherits:
-
Object
- Object
- Configuration::Thumnailer
- Includes:
- ClassLogging
- Defined in:
- lib/httpimagestore/configuration/thumbnailer.rb
Class Method Summary collapse
Class Method Details
.match(node) ⇒ Object
9 10 11 |
# File 'lib/httpimagestore/configuration/thumbnailer.rb', line 9 def self.match(node) node.name == 'thumbnailer' end |
.parse(configuration, node) ⇒ Object
13 14 15 16 17 |
# File 'lib/httpimagestore/configuration/thumbnailer.rb', line 13 def self.parse(configuration, node) configuration.thumbnailer and raise StatementCollisionError.new(node, 'thumbnailer') node.required_attributes('url') configuration.thumbnailer = HTTPThumbnailerClient.new(node.grab_attributes('url').first) end |
.post(configuration) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/httpimagestore/configuration/thumbnailer.rb', line 19 def self.post(configuration) if not configuration.thumbnailer configuration.thumbnailer = HTTPThumbnailerClient.new(configuration.defaults[:thumbnailer_url] || 'http://localhost:3100') end log.info "using thumbnailer at #{configuration.thumbnailer.server_url}" end |