Module: Lolp::Configuration
- Included in:
- Client
- Defined in:
- lib/lolp/configuration.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#password ⇒ Object
Returns the value of attribute password.
-
#token ⇒ Object
Returns the value of attribute token.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
3 4 5 |
# File 'lib/lolp/configuration.rb', line 3 def api_endpoint @api_endpoint end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/lolp/configuration.rb', line 3 def password @password end |
#token ⇒ Object
Returns the value of attribute token.
3 4 5 |
# File 'lib/lolp/configuration.rb', line 3 def token @token end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/lolp/configuration.rb', line 3 def username @username end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
5 6 7 |
# File 'lib/lolp/configuration.rb', line 5 def configure yield self end |
#defaults ⇒ Object
9 10 11 12 13 14 |
# File 'lib/lolp/configuration.rb', line 9 def defaults @api_endpoint = ENV['LOLIPOP_MC_API_ENDPOINT'] || 'https://api.mc.lolipop.jp/' @username = ENV['LOLIPOP_MC_USERNAME'] @password = ENV['LOLIPOP_MC_PASSWORD'] @token = ENV['LOLIPOP_MC_TOKEN'] end |