Sha256: 416f4d6c8312a80fda698d5615fae0ed328e8d607b3c49ae46bf4138d788b32d

Contents?: true

Size: 582 Bytes

Versions: 11

Compression:

Stored size: 582 Bytes

Contents

# frozen_string_literal: true

require 'mailerlite/version'
require 'mailerlite/utils'
require 'mailerlite/error'
require 'mailerlite/client'

# Main module for gem.
module MailerLite
  class << self
    def client
      @client ||= MailerLite::Client.new
    end

    private

    def method_missing(method_name, *args, &block)
      return super unless client.respond_to?(method_name)

      client.send(method_name, *args, &block)
    end

    def respond_to_missing?(method_name, include_private = false)
      client.respond_to?(method_name, include_private)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mailerlite-1.16.0 lib/mailerlite.rb
mailerlite-1.15.0 lib/mailerlite.rb
mailerlite-1.14.0 lib/mailerlite.rb
mailerlite-1.13.1 lib/mailerlite.rb
mailerlite-1.13.0 lib/mailerlite.rb
mailerlite-1.12.0 lib/mailerlite.rb
mailerlite-1.11.0 lib/mailerlite.rb
mailerlite-1.10.0 lib/mailerlite.rb
mailerlite-1.9.0 lib/mailerlite.rb
mailerlite-1.8.0 lib/mailerlite.rb
mailerlite-1.7.0 lib/mailerlite.rb