Class: As2::Config::ServerInfo
- Inherits:
-
Struct
- Object
- Struct
- As2::Config::ServerInfo
- Defined in:
- lib/as2/config.rb
Instance Attribute Summary collapse
-
#certificate ⇒ Object
Returns the value of attribute certificate.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pkey ⇒ Object
Returns the value of attribute pkey.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#certificate ⇒ Object
Returns the value of attribute certificate
86 87 88 |
# File 'lib/as2/config.rb', line 86 def certificate @certificate end |
#domain ⇒ Object
Returns the value of attribute domain
86 87 88 |
# File 'lib/as2/config.rb', line 86 def domain @domain end |
#name ⇒ Object
Returns the value of attribute name
86 87 88 |
# File 'lib/as2/config.rb', line 86 def name @name end |
#pkey ⇒ Object
Returns the value of attribute pkey
86 87 88 |
# File 'lib/as2/config.rb', line 86 def pkey @pkey end |
#url ⇒ Object
Returns the value of attribute url
86 87 88 |
# File 'lib/as2/config.rb', line 86 def url @url end |
Instance Method Details
#add_partner {|partner| ... } ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/as2/config.rb', line 112 def add_partner partner = Partner.new yield partner unless partner.name raise 'Partner name is required' end unless partner.signing_certificate raise 'Partner signing certificate is required' end unless partner.encryption_certificate raise 'Partner encryption certificate is required' end unless partner.url raise 'Partner URL is required' end Config.partners[partner.name] = partner Config.store.add_cert partner.signing_certificate Config.store.add_cert partner.encryption_certificate end |