Class: Cloudinary::Cache::BreakpointsCache
- Defined in:
 - lib/cloudinary/cache/breakpoints_cache.rb
 
Instance Attribute Summary collapse
- 
  
    
      #adapter  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute adapter.
 
Instance Method Summary collapse
- #fetch(public_id, options) ⇒ Object
 - #get(public_id, options) ⇒ Object
 - #options_to_parameters(options) ⇒ Object
 - #set(public_id, options, value) ⇒ Object
 
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
      3 4 5  | 
    
      # File 'lib/cloudinary/cache/breakpoints_cache.rb', line 3 def adapter @adapter end  | 
  
Instance Method Details
#fetch(public_id, options) ⇒ Object
      11 12 13 14 15  | 
    
      # File 'lib/cloudinary/cache/breakpoints_cache.rb', line 11 def fetch(public_id, ) upload_type, resource_type, transformation, format = () @adapter.set(public_id, upload_type, resource_type, transformation, format, &Proc.new) end  | 
  
#get(public_id, options) ⇒ Object
      17 18 19 20  | 
    
      # File 'lib/cloudinary/cache/breakpoints_cache.rb', line 17 def get(public_id, ) upload_type, resource_type, transformation, format = () @adapter.get(public_id, upload_type, resource_type, transformation, format) end  | 
  
#options_to_parameters(options) ⇒ Object
      22 23 24 25 26 27 28 29  | 
    
      # File 'lib/cloudinary/cache/breakpoints_cache.rb', line 22 def () = Cloudinary::Utils.symbolize_keys transformation = Cloudinary::Utils.generate_transformation_string() upload_type = [:type] || 'upload' resource_type = [:resource_type] || 'image' format = [:format] || "" [upload_type, resource_type, transformation, format] end  | 
  
#set(public_id, options, value) ⇒ Object
      5 6 7 8 9  | 
    
      # File 'lib/cloudinary/cache/breakpoints_cache.rb', line 5 def set(public_id, , value) upload_type, resource_type, transformation, format = () @adapter.set(public_id, upload_type, resource_type, transformation, format, value) end  |