Class: Amfetamine::Config
- Inherits:
-
Object
- Object
- Amfetamine::Config
- Defined in:
- lib/amfetamine/config.rb
Class Attribute Summary collapse
-
.base_uri ⇒ Object
Returns the value of attribute base_uri.
-
.disable_caching ⇒ Object
Returns the value of attribute disable_caching.
-
.logger ⇒ Object
readonly
Returns the value of attribute logger.
-
.memcached_instance ⇒ Object
Returns the value of attribute memcached_instance.
-
.resource_suffix ⇒ Object
Returns the value of attribute resource_suffix.
-
.rest_client ⇒ Object
Returns the value of attribute rest_client.
Class Method Summary collapse
Class Attribute Details
.base_uri ⇒ Object
Returns the value of attribute base_uri.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def base_uri @base_uri end |
.disable_caching ⇒ Object
Returns the value of attribute disable_caching.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def disable_caching @disable_caching end |
.logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def logger @logger end |
.memcached_instance ⇒ Object
Returns the value of attribute memcached_instance.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def memcached_instance @memcached_instance end |
.resource_suffix ⇒ Object
Returns the value of attribute resource_suffix.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def resource_suffix @resource_suffix end |
.rest_client ⇒ Object
Returns the value of attribute rest_client.
5 6 7 |
# File 'lib/amfetamine/config.rb', line 5 def rest_client @rest_client end |
Class Method Details
.configure {|_self| ... } ⇒ Object
7 8 9 10 |
# File 'lib/amfetamine/config.rb', line 7 def configure yield(self) @base_uri ||= "" end |
.default_memcached_options ⇒ Object
37 38 39 40 41 |
# File 'lib/amfetamine/config.rb', line 37 def { expires_in: expiration_time } end |
.expiration_time ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/amfetamine/config.rb', line 43 def expiration_time if defined?(::Rails) && Rails.env.development? 60.seconds else 10.minutes end end |