Class: Ruberto::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ruberto/configuration.rb,
lib/ruberto/configuration/memory_cache.rb

Defined Under Namespace

Classes: MemoryCache

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



8
9
10
# File 'lib/ruberto/configuration.rb', line 8

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



8
9
10
# File 'lib/ruberto/configuration.rb', line 8

def client_secret
  @client_secret
end

#customer_idObject

Returns the value of attribute customer_id.



8
9
10
# File 'lib/ruberto/configuration.rb', line 8

def customer_id
  @customer_id
end

Instance Method Details

#cacheObject



10
11
12
# File 'lib/ruberto/configuration.rb', line 10

def cache
  @cache ||= MemoryCache.new
end

#cache=(store) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/ruberto/configuration.rb', line 14

def cache=(store)
  unless %i[read write clear delete].all? { |method| store.respond_to?(method) }
    raise ArgumentError, "cache_store must respond to read, write, clear, and delete"
  end

  @cache = store
end