Module: Vufer::Configure

Included in:
Vufer
Defined in:
lib/vufer/configure.rb

Constant Summary collapse

@@access_key =
''
@@secret_key =
''

Instance Method Summary collapse

Instance Method Details

#access_keyObject



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

Yields:

  • (_self)

Yield Parameters:



8
9
10
# File 'lib/vufer/configure.rb', line 8

def configure
  yield self if block_given?
end

#secret_keyObject



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_defaultsObject



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