Class: Swagger::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Defaults go in here..



8
9
10
11
12
13
14
15
16
17
# File 'lib/swagger/configuration.rb', line 8

def initialize
  @format = 'json'
  @scheme = 'https'
  @host = 'api.taxamo.com'
  @base_path = ''
  @user_agent = "ruby-swagger"
  @inject_format = true
  @force_ending_format = false
  @camelize_params = false
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def api_key
  @api_key
end

#auth_tokenObject

Returns the value of attribute auth_token.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def auth_token
  @auth_token
end

#base_pathObject

Returns the value of attribute base_path.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def base_path
  @base_path
end

#camelize_paramsObject

Returns the value of attribute camelize_params.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def camelize_params
  @camelize_params
end

#force_ending_formatObject

Returns the value of attribute force_ending_format.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def force_ending_format
  @force_ending_format
end

#formatObject

Returns the value of attribute format.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def format
  @format
end

#hostObject

Returns the value of attribute host.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def host
  @host
end

#inject_formatObject

Returns the value of attribute inject_format.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def inject_format
  @inject_format
end

#loggerObject

Returns the value of attribute logger.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def logger
  @logger
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def password
  @password
end

#schemeObject

Returns the value of attribute scheme.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def scheme
  @scheme
end

#user_agentObject

Returns the value of attribute user_agent.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def user_agent
  @user_agent
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/swagger/configuration.rb', line 5

def username
  @username
end

Instance Method Details

#update(params) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/swagger/configuration.rb', line 19

def update(params)
  if params[:format]
    @format = params[:format]
  end
  if params[:scheme]
    @scheme = params[:scheme]
  end
  if params[:host]
    @host = params[:host]
  end
  if params[:base_path]
    @base_path = params[:base_path]
  end
  if params[:user_agent]
    @user_agent = params[:user_agent]
  end
  if params[:inject_format]
    @inject_format = params[:inject_format]
  end
  if params[:force_ending_format]
    @force_ending_format = params[:force_ending_format]
  end
  if params[:camelize_params]
    @camelize_params = params[:camelize_params]
  end
  if params[:api_key]
    @api_key = params[:api_key]
  end
  if params[:username]
    @username = params[:username]
  end
  if params[:password]
    @password = params[:password]
  end
  if params[:auth_token]
    @auth_token = params[:auth_token]
  end
  if params[:logger]
    @logger = params[:logger]
  end
end