Method: LibGems::Security::Policy#initialize
- Defined in:
- lib/libgems/security.rb
#initialize(policy = {}, opt = {}) ⇒ Policy
Create a new LibGems::Security::Policy object with the given mode and options.
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/libgems/security.rb', line 409 def initialize(policy = {}, opt = {}) # set options @opt = LibGems::Security::OPT.merge(opt) # build policy policy.each_pair do |key, val| case key when :verify_data then @verify_data = val when :verify_signer then @verify_signer = val when :verify_chain then @verify_chain = val when :verify_root then @verify_root = val when :only_trusted then @only_trusted = val when :only_signed then @only_signed = val end end end |