Module: Vufer::Configure
- Included in:
- Vufer
- Defined in:
- lib/vufer/configure.rb
Constant Summary collapse
- @@access_key =
''
- @@secret_key =
''
Instance Method Summary collapse
- #access_key ⇒ Object
- #access_key=(key) ⇒ Object
- #configure {|_self| ... } ⇒ Object
- #secret_key ⇒ Object
- #secret_key=(key) ⇒ Object
- #use_defaults ⇒ Object
Instance Method Details
#access_key ⇒ Object
16 17 18 |
# File 'lib/vufer/configure.rb', line 16 def access_key @@access_key end |
#access_key=(key) ⇒ Object
12 13 14 |
# File 'lib/vufer/configure.rb', line 12 def access_key=(key) @@access_key = key end |
#configure {|_self| ... } ⇒ Object
8 9 10 |
# File 'lib/vufer/configure.rb', line 8 def configure yield self if block_given? end |
#secret_key ⇒ Object
24 25 26 |
# File 'lib/vufer/configure.rb', line 24 def secret_key @@secret_key end |
#secret_key=(key) ⇒ Object
20 21 22 |
# File 'lib/vufer/configure.rb', line 20 def secret_key=(key) @@secret_key = key end |
#use_defaults ⇒ Object
28 29 30 31 32 33 |
# File 'lib/vufer/configure.rb', line 28 def use_defaults configure do |config| config.access_key ||= ENV['VWS_ACCESS_KEY'] config.secret_key ||= ENV['VWS_SECRET_KEY'] end end |