Module: IOSCertEnrollment::Configuration

Included in:
IOSCertEnrollment
Defined in:
lib/ios-cert-enrollment/configuration.rb

Overview

Defines constants and methods related to configuration

Constant Summary collapse

VALID_OPTIONS_KEYS =
[
  :ssl_certificate_path,
  :ssl_key_path,
  :base_url,
  :identifier,
  :display_name,
  :organization
].freeze

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Convenience method to allow configuration options to be set in a block

Yields:

  • (_self)

Yield Parameters:



18
19
20
# File 'lib/ios-cert-enrollment/configuration.rb', line 18

def configure
  yield self
end

#optionsObject

Create a hash of options and their values



23
24
25
26
27
# File 'lib/ios-cert-enrollment/configuration.rb', line 23

def options
  VALID_OPTIONS_KEYS.inject({}) do |option, key|
    option.merge!(key => send(key))
  end
end