Class: Hvor::Configuration
- Inherits:
-
Object
- Object
- Hvor::Configuration
- Defined in:
- lib/hvor/configuration.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#cache_expires_in ⇒ Object
Returns the value of attribute cache_expires_in.
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#download_timeout ⇒ Object
Returns the value of attribute download_timeout.
-
#import_batch_size ⇒ Object
Returns the value of attribute import_batch_size.
-
#ipv4_product_code ⇒ Object
Returns the value of attribute ipv4_product_code.
-
#ipv6_product_code ⇒ Object
Returns the value of attribute ipv6_product_code.
-
#queue_name ⇒ Object
Returns the value of attribute queue_name.
Instance Method Summary collapse
- #cache ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/hvor/configuration.rb', line 7 def initialize @api_token = nil @ipv4_product_code = "DB1LITECSV" @ipv6_product_code = "DB1LITECSVIPV6" @cache_store = -> { Rails.cache } @cache_expires_in = 24.hours @import_batch_size = 5_000 @download_timeout = 60 @queue_name = :hvor end |
Instance Attribute Details
#api_token ⇒ Object
Returns the value of attribute api_token.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def api_token @api_token end |
#cache_expires_in ⇒ Object
Returns the value of attribute cache_expires_in.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def cache_expires_in @cache_expires_in end |
#cache_store ⇒ Object
Returns the value of attribute cache_store.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def cache_store @cache_store end |
#download_timeout ⇒ Object
Returns the value of attribute download_timeout.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def download_timeout @download_timeout end |
#import_batch_size ⇒ Object
Returns the value of attribute import_batch_size.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def import_batch_size @import_batch_size end |
#ipv4_product_code ⇒ Object
Returns the value of attribute ipv4_product_code.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def ipv4_product_code @ipv4_product_code end |
#ipv6_product_code ⇒ Object
Returns the value of attribute ipv6_product_code.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def ipv6_product_code @ipv6_product_code end |
#queue_name ⇒ Object
Returns the value of attribute queue_name.
3 4 5 |
# File 'lib/hvor/configuration.rb', line 3 def queue_name @queue_name end |
Instance Method Details
#cache ⇒ Object
18 19 20 |
# File 'lib/hvor/configuration.rb', line 18 def cache cache_store.call end |