class Renderful::ContentEntry

Attributes

content_type[R]
fields[R]
id[R]
provider[R]

Public Class Methods

build_cache_key(provider, id: nil) click to toggle source
# File lib/renderful/content_entry.rb, line 8
def build_cache_key(provider, id: nil)
  ['renderful', provider.cache_prefix, id || '*'].join('/')
end
new(provider:, id:, content_type: nil, fields: {}) click to toggle source
# File lib/renderful/content_entry.rb, line 13
def initialize(provider:, id:, content_type: nil, fields: {})
  @provider = provider
  @id = id
  @content_type = content_type
  @fields = fields
end

Public Instance Methods

cache_key() click to toggle source
# File lib/renderful/content_entry.rb, line 20
def cache_key
  self.class.build_cache_key(provider, id: id)
end