class Garcon::Secret::Configuration

A Configuration instance

Attributes

lock[R]

@!attribute [r] :lock

@return [String] Access the shared Monitor for this instance.
queue[RW]

@!attribute [rw] :queue

@return [String] The shared queue object for this instance.
stash[RW]

@!attribute [rw] :stash

@return [String] The shared Stash (in-memory cache) for this instance.

Public Class Methods

new(options = {}) { |self| ... } click to toggle source

Initialized a configuration instance

@return [undefined]

@api private

# File lib/garcon/secret.rb, line 69
def initialize(options = {})
  @lock   = Monitor.new
  @stash  = MemStash.new
  @queue  = MutexPriorityQueue.new
  @queue << Secret.tmpfile until @queue.length >= 4

  yield self if block_given?
end

Public Instance Methods

to_h() click to toggle source

@api private

# File lib/garcon/secret.rb, line 79
def to_h
  { lock:  lock,
    stash: stash,
    queue: queue
  }.freeze
end