class OpenStax::Aws::SecretsSpecificationFactory
Attributes
attributes[R]
Public Class Methods
new(context)
click to toggle source
# File lib/openstax/aws/secrets_factory.rb, line 91 def initialize(context) raise ArgumentError, "context cannot be nil" if context.nil? @context = context @attributes = {} end
Public Instance Methods
format(&block)
click to toggle source
# File lib/openstax/aws/secrets_factory.rb, line 97 def format(&block) store_attribute(:format, &block) end
method_missing(name, *args, &block)
click to toggle source
# File lib/openstax/aws/secrets_factory.rb, line 101 def method_missing(name, *args, &block) store_attribute(name, *args, &block) end
store_attribute(name, *args, &block)
click to toggle source
# File lib/openstax/aws/secrets_factory.rb, line 105 def store_attribute(name, *args, &block) raise "Secrets specification option `#{name}` cannot be called with arguments, only a block" if !args.empty? raise "Secrets specification option `#{name}` must be called with a block to set the value" if !block_given? attributes[name.to_sym] = @context.instance_eval(&block) end