Module: RakutenApi
- Defined in:
- lib/rakuten_api.rb,
lib/rakuten_api/error.rb,
lib/rakuten_api/version.rb,
lib/rakuten_api/dummy_module.rb,
lib/rakuten_api/configuration.rb,
lib/rakuten_api/item_search/model.rb,
lib/rakuten_api/genre_search/model.rb,
lib/rakuten_api/item_ranking/model.rb,
lib/rakuten_api/item_search/client.rb,
lib/rakuten_api/genre_search/client.rb,
lib/rakuten_api/item_ranking/client.rb,
lib/rakuten_api/item_search/response.rb,
lib/rakuten_api/genre_search/response.rb,
lib/rakuten_api/item_ranking/response.rb
Defined Under Namespace
Modules: Base, DummyModule, GenreSearch, ItemRanking, ItemSearch
Classes: Configuration, Error, ServerError
Constant Summary
collapse
- APPLICATION_END_POINT =
"https://app.rakuten.co.jp/"
- VERSION =
"0.1.2"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
Also known as:
config
19
20
21
|
# File 'lib/rakuten_api.rb', line 19
def configuration
@configuration ||= Configuration.new
end
|
15
16
17
|
# File 'lib/rakuten_api.rb', line 15
def configure
yield configuration
end
|
.constantize(name) ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/rakuten_api.rb', line 24
def constantize(name)
names = config.send(name).split('::')
names.shift if names.empty? || names.first.empty?
constant = Object
names.each do |name|
constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
end
constant
end
|