Sha256: 1bbeafbf20b2613a6336daf49079c7a60c1729bf72772cc441e08e2813b60313

Contents?: true

Size: 515 Bytes

Versions: 6

Compression:

Stored size: 515 Bytes

Contents

require_relative 'marvel/client'

module Marvel
  class << self
    # Alias for Marvel::Client.new
    # @return [Marvel::Client]
    def new
      @client ||= Marvel::Client.new
    end

    # Delegate to Marvel::Client
    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
marvel_api-0.2.1 lib/marvel_api.rb
marvel_api-0.2.0 lib/marvel_api.rb
marvel_api-0.1.3 lib/marvel_api.rb
marvel_api-0.1.2 lib/marvel_api.rb
marvel_api-0.1.1 lib/marvel.rb
marvel_api-0.1.0 lib/marvel.rb