Class: Shikimori::OAuth2::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/shikimori/oauth2/config.rb

Overview

Configuration for Shikimori OAuth2 client

Constant Summary collapse

DEFAULT_SITE_URL =

Returns Default site url.

Returns:

  • (String)

    Default site url

'https://shikimori.one/'
DEFAULT_APP_NAME =

Returns Default APP name.

Returns:

  • (String)

    Default APP name

'Api Test'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(site: DEFAULT_SITE_URL, app_name: DEFAULT_APP_NAME, **options) ⇒ Config

Returns a new instance of Config.



14
15
16
17
# File 'lib/shikimori/oauth2/config.rb', line 14

def initialize(site: DEFAULT_SITE_URL, app_name: DEFAULT_APP_NAME, **options)
  @app_name = app_name
  @options = { site: site }.merge(options)
end

Instance Attribute Details

#app_nameObject

Returns the value of attribute app_name.



12
13
14
# File 'lib/shikimori/oauth2/config.rb', line 12

def app_name
  @app_name
end

#optionsObject

Returns the value of attribute options.



12
13
14
# File 'lib/shikimori/oauth2/config.rb', line 12

def options
  @options
end

#siteObject

Returns the value of attribute site.



12
13
14
# File 'lib/shikimori/oauth2/config.rb', line 12

def site
  @site
end