Sha256: aaafcb43e824a154298051940c1894936710e0396a5b496c43491a3f6c6a493b

Contents?: true

Size: 669 Bytes

Versions: 3

Compression:

Stored size: 669 Bytes

Contents

module Minitext
  autoload :Message, 'minitext/message'
  autoload :MissingParameter, 'minitext/missing_parameter'
  autoload :TestGateway, 'minitext/test_gateway'
  autoload :TwilioGateway, 'minitext/twilio_gateway'
  autoload :WhitelistProxy, 'minitext/whitelist_proxy'

  def self.gateway
    @gateway ||= TestGateway.new
  end

  def self.gateway=(gateway)
    @gateway = gateway
  end

  def self.defaults
    @defaults ||= {}
    {gateway: gateway}.merge(@defaults)
  end

  def self.defaults=(defaults)
    @defaults = defaults
  end

  def self.text(params)
    Message.new(defaults.merge(params))
  end
end

if defined?(Rails)
  require 'minitext/railtie'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
minitext-0.0.8 lib/minitext.rb
minitext-0.0.7 lib/minitext.rb
minitext-0.0.6 lib/minitext.rb