module TFS::Configuration
Constants
- CONNECTION_DEFAULTS
Attributes
connection_options[RW]
endpoint[RW]
namespace[RW]
password[W]
provider[RW]
username[W]
Public Class Methods
connection_options()
click to toggle source
# File lib/tfs/configuration.rb, line 38 def connection_options CONNECTION_DEFAULTS end
endpoint()
click to toggle source
# File lib/tfs/configuration.rb, line 50 def endpoint ENV['TFS_ENDPOINT'] end
keys()
click to toggle source
# File lib/tfs/configuration.rb, line 27 def keys @keys ||= [ :username, :password, :endpoint, :connection_options, :provider, :namespace ] end
namespace()
click to toggle source
No default namespace
# File lib/tfs/configuration.rb, line 63 def namespace ; end
options()
click to toggle source
# File lib/tfs/configuration.rb, line 58 def options Hash[Configuration.keys.map{|key| [key, send(key)]}] end
password()
click to toggle source
# File lib/tfs/configuration.rb, line 46 def password ENV['TFS_PASSWORD'] end
provider()
click to toggle source
# File lib/tfs/configuration.rb, line 54 def provider OData::Service end
username()
click to toggle source
# File lib/tfs/configuration.rb, line 42 def username ENV['TFS_USERNAME'] end
Public Instance Methods
configure() { |self| ... }
click to toggle source
# File lib/tfs/configuration.rb, line 66 def configure yield self self end
reset!()
click to toggle source
# File lib/tfs/configuration.rb, line 71 def reset! TFS::Configuration.keys.each do |key| instance_variable_set(:"@#{key}", Configuration.options[key]) end self end
Also aliased as: setup
Private Instance Methods
client_options()
click to toggle source
# File lib/tfs/configuration.rb, line 84 def client_options connection_options.merge(username: @username, password: @password, namespace: @namespace) end
options()
click to toggle source
# File lib/tfs/configuration.rb, line 80 def options Hash[TFS::Configuration.keys.map{|key| [key, instance_variable_get(:"@#{key}")]}] end