module Adaptor

Adaptor makes it easy to implement the Adapter pattern in Ruby.

@example Defining a new adaptor

class EmailAdaptor
  include Adaptor

  def self.supports?(notification)
    notification.recipient.email.present?
  end
end

Constants

VERSION

Public Class Methods

included(klass) click to toggle source
# File lib/adaptor.rb, line 18
def self.included(klass)
  klass.extend ClassMethods
end