Class: Swagger::Configuration
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#base_path ⇒ Object
Returns the value of attribute base_path.
-
#camelize_params ⇒ Object
Returns the value of attribute camelize_params.
-
#force_ending_format ⇒ Object
Returns the value of attribute force_ending_format.
-
#format ⇒ Object
Returns the value of attribute format.
-
#host ⇒ Object
Returns the value of attribute host.
-
#inject_format ⇒ Object
Returns the value of attribute inject_format.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#password ⇒ Object
Returns the value of attribute password.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Defaults go in here..
- #update(params) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def api_key @api_key end |
#auth_token ⇒ Object
Returns the value of attribute auth_token.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def auth_token @auth_token end |
#base_path ⇒ Object
Returns the value of attribute base_path.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def base_path @base_path end |
#camelize_params ⇒ Object
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_format ⇒ Object
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 |
#format ⇒ Object
Returns the value of attribute format.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def format @format end |
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def host @host end |
#inject_format ⇒ Object
Returns the value of attribute inject_format.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def inject_format @inject_format end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def logger @logger end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def password @password end |
#scheme ⇒ Object
Returns the value of attribute scheme.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def scheme @scheme end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
5 6 7 |
# File 'lib/swagger/configuration.rb', line 5 def user_agent @user_agent end |
#username ⇒ Object
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 |