Class: ThumborHelpers::Config
- Inherits:
-
Object
- Object
- ThumborHelpers::Config
- Defined in:
- lib/thumbor_helpers/config.rb
Instance Attribute Summary collapse
-
#allowed_image_extensions ⇒ Regexp
RegExp match to enable thumbor images.
-
#cripto_generator ⇒ Object
readonly
Returns the value of attribute cripto_generator.
-
#enabled ⇒ Boolean
(also: #enabled?)
Definisce se l’override è attivo o meno.
-
#image_root_host ⇒ String
Dominio dove andare a cercare l’immagine.
-
#security_key ⇒ String
Chiave per generare l’url correttamente criptato per thumbor.
-
#server_url ⇒ String
Identifica l’host di thumbor ES: thumbor.archimedianet.it.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #reconfigure_thumbor ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
35 36 37 38 39 |
# File 'lib/thumbor_helpers/config.rb', line 35 def initialize @enabled = false @allowed_image_extensions = /(.*\.jpe?g|.*\.png)/ reconfigure_thumbor end |
Instance Attribute Details
#allowed_image_extensions ⇒ Regexp
RegExp match to enable thumbor images
33 34 35 |
# File 'lib/thumbor_helpers/config.rb', line 33 def allowed_image_extensions @allowed_image_extensions end |
#cripto_generator ⇒ Object (readonly)
Returns the value of attribute cripto_generator.
28 29 30 |
# File 'lib/thumbor_helpers/config.rb', line 28 def cripto_generator @cripto_generator end |
#enabled ⇒ Boolean Also known as: enabled?
Definisce se l’override è attivo o meno
21 22 23 |
# File 'lib/thumbor_helpers/config.rb', line 21 def enabled @enabled end |
#image_root_host ⇒ String
Dominio dove andare a cercare l’immagine
26 27 28 |
# File 'lib/thumbor_helpers/config.rb', line 26 def image_root_host @image_root_host end |
#security_key ⇒ String
Chiave per generare l’url correttamente criptato per thumbor
16 17 18 |
# File 'lib/thumbor_helpers/config.rb', line 16 def security_key @security_key end |
#server_url ⇒ String
Identifica l’host di thumbor ES: thumbor.archimedianet.it
11 12 13 |
# File 'lib/thumbor_helpers/config.rb', line 11 def server_url @server_url end |
Instance Method Details
#reconfigure_thumbor ⇒ Object
41 42 43 44 |
# File 'lib/thumbor_helpers/config.rb', line 41 def reconfigure_thumbor @cripto_generator = Thumbor::CryptoURL.new(@security_key) nil end |