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 =
'https://shikimori.one/'
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.



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

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.



10
11
12
# File 'lib/shikimori/oauth2/config.rb', line 10

def app_name
  @app_name
end

#optionsObject

Returns the value of attribute options.



10
11
12
# File 'lib/shikimori/oauth2/config.rb', line 10

def options
  @options
end

#siteObject

Returns the value of attribute site.



10
11
12
# File 'lib/shikimori/oauth2/config.rb', line 10

def site
  @site
end