class Griddler::Configuration

Attributes

email_class[W]
processor_method[RW]
reply_delimiter[RW]

Public Instance Methods

email_class() click to toggle source
# File lib/griddler/configuration.rb, line 40
def email_class
  @email_class ||= Griddler::Email
end
email_service() click to toggle source
# File lib/griddler/configuration.rb, line 52
def email_service
  @email_service_adapter ||=
    Griddler.adapter_registry[:default] ||
      raise(Griddler::Errors::EmailServiceAdapterNotFound)
end
email_service=(new_email_service) click to toggle source
# File lib/griddler/configuration.rb, line 58
def email_service=(new_email_service)
  @email_service_adapter = Griddler.adapter_registry.fetch(new_email_service) { raise Griddler::Errors::EmailServiceAdapterNotFound }
end
processor_class() click to toggle source
# File lib/griddler/configuration.rb, line 22
    def processor_class
      @processor_class ||=
        begin
          EmailProcessor.to_s
        rescue NameError
          raise NameError.new(<<-ERROR.strip_heredoc, 'EmailProcessor')
            To use Griddler, you must either define `EmailProcessor` or configure a
            different processor. See https://github.com/thoughtbot/griddler#defaults for
            more information.
          ERROR
        end
      @processor_class.constantize
    end
processor_class=(klass) click to toggle source
# File lib/griddler/configuration.rb, line 36
def processor_class=(klass)
  @processor_class = klass.to_s
end