Class: Binocs::Swagger::Client
- Inherits:
-
Object
- Object
- Binocs::Swagger::Client
- Defined in:
- lib/binocs/swagger/client.rb
Constant Summary collapse
- CACHE_TTL =
5 minutes
300
Class Method Summary collapse
Class Method Details
.clear_cache ⇒ Object
23 24 25 26 |
# File 'lib/binocs/swagger/client.rb', line 23 def clear_cache @cached_spec = nil @cache_time = nil end |
.fetch_spec ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/binocs/swagger/client.rb', line 13 def fetch_spec return nil unless Binocs.configuration.swagger_enabled? if cached_spec_valid? @cached_spec else refresh_spec end end |