Module: Minitext
- Defined in:
- lib/minitext.rb,
lib/minitext/message.rb,
lib/minitext/version.rb,
lib/minitext/test_gateway.rb,
lib/minitext/configuration.rb,
lib/minitext/twilio_gateway.rb,
lib/minitext/allowlist_proxy.rb
Defined Under Namespace
Classes: AllowlistProxy, Configuration, Error, Message, TestGateway, TwilioGateway
Constant Summary
collapse
- VERSION =
"1.0.0"
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
13
14
15
|
# File 'lib/minitext.rb', line 13
def self.configuration
@configuration ||= Configuration.new
end
|
17
18
19
|
# File 'lib/minitext.rb', line 17
def self.configure(&block)
yield(configuration)
end
|
.gateway ⇒ Object
21
22
23
|
# File 'lib/minitext.rb', line 21
def self.gateway
configuration.gateway
end
|
.text(**kwargs) ⇒ Object
25
26
27
|
# File 'lib/minitext.rb', line 25
def self.text(**kwargs)
Message.new(**configuration.message_defaults.merge(gateway: configuration.gateway).merge(kwargs))
end
|