Module: Lolp::Configuration

Included in:
Client
Defined in:
lib/lolp/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_endpointObject

Returns the value of attribute api_endpoint.



3
4
5
# File 'lib/lolp/configuration.rb', line 3

def api_endpoint
  @api_endpoint
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/lolp/configuration.rb', line 3

def password
  @password
end

#tokenObject

Returns the value of attribute token.



3
4
5
# File 'lib/lolp/configuration.rb', line 3

def token
  @token
end

#usernameObject

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

Yields:

  • (_self)

Yield Parameters:



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

def configure
  yield self
end

#defaultsObject



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