Module: WorldBank
- Defined in:
- lib/world_bank.rb,
lib/world_bank/data.rb,
lib/world_bank/query.rb,
lib/world_bank/topic.rb,
lib/world_bank/client.rb,
lib/world_bank/region.rb,
lib/world_bank/source.rb,
lib/world_bank/country.rb,
lib/world_bank/version.rb,
lib/world_bank/indicator.rb,
lib/world_bank/data_query.rb,
lib/world_bank/param_query.rb,
lib/world_bank/income_level.rb,
lib/world_bank/lending_type.rb
Defined Under Namespace
Classes: Client, Country, Data, DataQuery, IncomeLevel, Indicator, LendingType, ParamQuery, Query, Region, Source, Topic
Constant Summary collapse
- VERSION =
"0.9.0"
Class Method Summary collapse
- .client(query = {}, raw = false) ⇒ Object
-
.method_missing(method, *args, &block) ⇒ Object
Delegate to WorldBank::Client.new.
- .respond_to?(method, include_private = false) ⇒ Boolean
Class Method Details
.client(query = {}, raw = false) ⇒ Object
5 6 7 8 9 |
# File 'lib/world_bank.rb', line 5 def self.client(query={}, raw=false) defaults = {:params => {:format => :json}, :dirs => []} defaults.merge!(query) WorldBank::Client.new(defaults, raw) end |
.method_missing(method, *args, &block) ⇒ Object
Delegate to WorldBank::Client.new
12 13 14 15 |
# File 'lib/world_bank.rb', line 12 def self.method_missing(method, *args, &block) return super unless client.respond_to?(method) client.send(method, *args, &block) end |
.respond_to?(method, include_private = false) ⇒ Boolean
17 18 19 |
# File 'lib/world_bank.rb', line 17 def self.respond_to?(method, include_private=false) client.respond_to?(method, include_private) || super(method, include_private) end |