Module: Wikipedia
- Defined in:
- lib/wikipedia.rb,
lib/wikipedia/url.rb,
lib/wikipedia/page.rb,
lib/wikipedia/client.rb,
lib/wikipedia/version.rb,
lib/wikipedia/configuration.rb
Defined Under Namespace
Classes: Client, Configuration, Page, Url
Constant Summary collapse
- VERSION =
'1.14.0'.freeze
Class Method Summary collapse
- .configure(&block) ⇒ Object
-
.Configure(&block) ⇒ Object
rubocop:disable Style/MethodName.
-
.find(page, options = {}) ⇒ Object
basically just a wrapper for doing client = Wikipedia::Client.new client.find(‘Rails’).
- .find_image(title, options = {}) ⇒ Object
- .find_random(options = {}) ⇒ Object
Class Method Details
.configure(&block) ⇒ Object
26 27 28 |
# File 'lib/wikipedia.rb', line 26 def self.configure(&block) Configuration.instance.instance_eval(&block) end |
.Configure(&block) ⇒ Object
rubocop:disable Style/MethodName
31 32 33 |
# File 'lib/wikipedia.rb', line 31 def self.Configure(&block) configure(&block) end |
.find(page, options = {}) ⇒ Object
basically just a wrapper for doing client = Wikipedia::Client.new client.find(‘Rails’)
14 15 16 |
# File 'lib/wikipedia.rb', line 14 def self.find( page, = {} ) client.find( page, ) end |
.find_image(title, options = {}) ⇒ Object
18 19 20 |
# File 'lib/wikipedia.rb', line 18 def self.find_image( title, = {} ) client.find_image( title, ) end |
.find_random(options = {}) ⇒ Object
22 23 24 |
# File 'lib/wikipedia.rb', line 22 def self.find_random( = {} ) client.find_random( ) end |