Class: Renshuu::Configuration

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

Overview

Configuraiton object for the library.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_keyString?

Returns:

  • (String, nil)


25
26
27
# File 'lib/renshuu/configuration.rb', line 25

def api_key
  @api_key
end

Instance Method Details

#api_urlURI

URL of the Renshuu API.

Returns:

  • (URI)


11
12
13
# File 'lib/renshuu/configuration.rb', line 11

def api_url
  @api_url ||= URI('https://api.renshuu.org')
end

#api_url=(new_url) ⇒ Object

Sets the API URL.

Parameters:

  • new_url (URI, String)


19
20
21
# File 'lib/renshuu/configuration.rb', line 19

def api_url=(new_url)
  @api_url = new_url && URI(new_url)
end