Class: ImageServer::Configuration
- Inherits:
-
Object
- Object
- ImageServer::Configuration
- Defined in:
- lib/image_server/configuration.rb
Instance Attribute Summary collapse
-
#cdn_host ⇒ Object
Returns the value of attribute cdn_host.
-
#cdn_protocol ⇒ Object
Returns the value of attribute cdn_protocol.
-
#log_directory ⇒ Object
Returns the value of attribute log_directory.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#path_to_binary ⇒ Object
Returns the value of attribute path_to_binary.
-
#sharded_cdn_host ⇒ Object
Returns the value of attribute sharded_cdn_host.
-
#sharded_host_count ⇒ Object
Returns the value of attribute sharded_host_count.
-
#upload_host ⇒ Object
returns upload_host with a protocol included example: if @upload_host is ‘example.com` will return `example.com`.
Instance Method Summary collapse
Instance Attribute Details
#cdn_host ⇒ Object
Returns the value of attribute cdn_host.
10 11 12 |
# File 'lib/image_server/configuration.rb', line 10 def cdn_host @cdn_host end |
#cdn_protocol ⇒ Object
Returns the value of attribute cdn_protocol.
9 10 11 |
# File 'lib/image_server/configuration.rb', line 9 def cdn_protocol @cdn_protocol end |
#log_directory ⇒ Object
Returns the value of attribute log_directory.
6 7 8 |
# File 'lib/image_server/configuration.rb', line 6 def log_directory @log_directory end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/image_server/configuration.rb', line 5 def logger @logger end |
#path_to_binary ⇒ Object
Returns the value of attribute path_to_binary.
8 9 10 |
# File 'lib/image_server/configuration.rb', line 8 def path_to_binary @path_to_binary end |
#sharded_cdn_host ⇒ Object
Returns the value of attribute sharded_cdn_host.
11 12 13 |
# File 'lib/image_server/configuration.rb', line 11 def sharded_cdn_host @sharded_cdn_host end |
#sharded_host_count ⇒ Object
Returns the value of attribute sharded_host_count.
12 13 14 |
# File 'lib/image_server/configuration.rb', line 12 def sharded_host_count @sharded_host_count end |
#upload_host ⇒ Object
returns upload_host with a protocol included example: if @upload_host is ‘example.com` will return `example.com`
22 23 24 25 26 27 |
# File 'lib/image_server/configuration.rb', line 22 def upload_host return unless @upload_host return @upload_host if @upload_host.start_with?('http') "http://#{@upload_host}" end |
Instance Method Details
#port ⇒ Object
14 15 16 17 18 |
# File 'lib/image_server/configuration.rb', line 14 def port return unless @upload_host URI(upload_host).port end |