Module: EmaySoap::Configurable
Instance Attribute Summary collapse
-
#cdkey ⇒ Object
Returns the value of attribute cdkey.
-
#key ⇒ Object
Returns the value of attribute key.
-
#password ⇒ Object
Returns the value of attribute password.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#cdkey ⇒ Object
Returns the value of attribute cdkey.
3 4 5 |
# File 'lib/emay_soap/configurable.rb', line 3 def cdkey @cdkey end |
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/emay_soap/configurable.rb', line 3 def key @key end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/emay_soap/configurable.rb', line 3 def password @password end |
#prefix ⇒ Object
Returns the value of attribute prefix.
3 4 5 |
# File 'lib/emay_soap/configurable.rb', line 3 def prefix @prefix end |
Class Method Details
.default_options ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/emay_soap/configurable.rb', line 6 def { prefix: ENV['EMAY_PREFIX'], cdkey: ENV['EMAY_CDKEY'], key: ENV['EMAY_KEY'], # session key, max length is 15 password: ENV['EMAY_PASSWORD'] } end |
.setup_keys ⇒ Object
15 16 17 |
# File 'lib/emay_soap/configurable.rb', line 15 def setup_keys @setup_keys ||= [:prefix, :cdkey, :key, :password] end |
Instance Method Details
#options ⇒ Object
20 21 22 23 24 25 |
# File 'lib/emay_soap/configurable.rb', line 20 def ary = EmaySoap::Configurable.setup_keys.map do |key| [key, send(key)] end Hash[ary] end |
#setup {|_self| ... } ⇒ Object
27 28 29 |
# File 'lib/emay_soap/configurable.rb', line 27 def setup yield self end |