class SfnParameters::Safe
Safe
storage
Safe
storage
Attributes
arguments[R]
@return [Hash] safe configuration
Public Class Methods
build(args = {})
click to toggle source
Build a new safe instance
@param args [Hash] arguments for safe instance @option args [String] :type type of safe @return [Safe]
# File lib/sfn-parameters/safe.rb, line 42 def build(args = {}) args = args.to_smash type = Bogo::Utility.camel(args.fetch(:type, "ssl")) if const_defined?(type) const_get(type).new(args) else raise ArgumentError.new "Unknown safe type provided `#{type}`." end end
new(args = {})
click to toggle source
Create a new safe
@param args [Hash] @return [self]
# File lib/sfn-parameters/safe.rb, line 15 def initialize(args = {}) @arguments = args.to_smash end
Public Instance Methods
lock(value)
click to toggle source
Lock a given value for storage
@param value [String] value to lock @return [Hash]
# File lib/sfn-parameters/safe.rb, line 23 def lock(value) raise NotImplementedError end
unlock(value)
click to toggle source
Unlock a given value for access
@param value [Hash] content to unlock @return [String]
# File lib/sfn-parameters/safe.rb, line 31 def unlock(value) raise NotImplementedError end