Module: PUBG::Configurable
Overview
Configuration options for Client
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
-
#connection_options ⇒ Object
readonly
Returns the value of attribute connection_options.
-
#region ⇒ Object
Returns the value of attribute region.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
4 5 6 |
# File 'lib/pubg/configurable.rb', line 4 def access_token @access_token end |
#api_endpoint ⇒ Object (readonly)
Returns the value of attribute api_endpoint.
5 6 7 |
# File 'lib/pubg/configurable.rb', line 5 def api_endpoint @api_endpoint end |
#connection_options ⇒ Object (readonly)
Returns the value of attribute connection_options.
5 6 7 |
# File 'lib/pubg/configurable.rb', line 5 def end |
#region ⇒ Object
Returns the value of attribute region.
4 5 6 |
# File 'lib/pubg/configurable.rb', line 4 def region @region end |
Class Method Details
.keys ⇒ Object
8 9 10 |
# File 'lib/pubg/configurable.rb', line 8 def keys @keys || i[access_token region api_endpoint] end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
13 14 15 |
# File 'lib/pubg/configurable.rb', line 13 def configure yield self end |
#reset! ⇒ Object
17 18 19 20 21 22 |
# File 'lib/pubg/configurable.rb', line 17 def reset! PUBG::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", PUBG::Default.[key]) end self end |