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.7.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
28 29 30 |
# File 'lib/wikipedia.rb', line 28 def self.configure(&block) Configuration.instance.instance_eval(&block) end |
.Configure(&block) ⇒ Object
rubocop:disable Style/MethodName
33 34 35 |
# File 'lib/wikipedia.rb', line 33 def self.Configure(&block) configure(&block) end |
.find(page, options = {}) ⇒ Object
basically just a wrapper for doing client = Wikipedia::Client.new client.find(‘Rails’)
16 17 18 |
# File 'lib/wikipedia.rb', line 16 def self.find( page, = {} ) client.find( page, ) end |
.find_image(title, options = {}) ⇒ Object
20 21 22 |
# File 'lib/wikipedia.rb', line 20 def self.find_image( title, = {} ) client.find_image( title, ) end |
.find_random(options = {}) ⇒ Object
24 25 26 |
# File 'lib/wikipedia.rb', line 24 def self.find_random( = {} ) client.find_random( ) end |