Module: Readmill
- Defined in:
- lib/readmill.rb,
lib/readmill/error.rb,
lib/readmill/client.rb,
lib/readmill/request.rb,
lib/readmill/version.rb,
lib/readmill/client/books.rb,
lib/readmill/client/users.rb,
lib/readmill/client/search.rb,
lib/readmill/configuration.rb,
lib/readmill/client/periods.rb,
lib/readmill/client/comments.rb,
lib/readmill/client/readings.rb,
lib/readmill/client/locations.rb,
lib/readmill/client/highlights.rb,
lib/readmill/client/closing_remarks.rb
Defined Under Namespace
Modules: Request Classes: BadRequest, Client, Configuration, Error, Forbidden, GatewayTimeout, InternalServerError, NotFound, Unauthorized
Constant Summary collapse
- VERSION =
Public: The version of the Readmill gem.
'0.2.0'.freeze
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
Public: Configure a Readmill client.
-
.method_missing(method, *args, &block) ⇒ Object
Public: Delegate methods to Readmill::Client.new.
-
.new(options = {}) ⇒ Object
Public: An alias for Readmill::Client.new.
-
.respond_to?(method, include_private = false) ⇒ Boolean
Public: Delegate to Readmill::Client.new respond_to?.
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
4 5 6 |
# File 'lib/readmill/configuration.rb', line 4 def configuration @configuration end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
14 15 16 17 |
# File 'lib/readmill/configuration.rb', line 14 def self.configure self.configuration ||= Configuration.new yield(configuration) end |
.method_missing(method, *args, &block) ⇒ Object
Public: Delegate methods to Readmill::Client.new. If a Readmill::Client does not respond_to? the :method, pass it up the chain.
Returns nothing.
20 21 22 23 |
# File 'lib/readmill.rb', line 20 def method_missing(method, *args, &block) return super unless new.respond_to?(method) new.send(method, *args, &block) end |
.new(options = {}) ⇒ Object
Public: An alias for Readmill::Client.new.
Returns an Readmill::Client.
12 13 14 |
# File 'lib/readmill.rb', line 12 def new(={}) Readmill::Client.new() end |
.respond_to?(method, include_private = false) ⇒ Boolean
Public: Delegate to Readmill::Client.new respond_to?
Returns nothing.
28 29 30 |
# File 'lib/readmill.rb', line 28 def respond_to?(method, include_private=false) new.respond_to?(method, include_private) || super(method, include_private) end |