Class: Txter::Gateway4info::Request
- Inherits:
-
Txter::Gateway::Request
- Object
- Txter::Gateway::Request
- Txter::Gateway4info::Request
- Defined in:
- lib/gateway_4info.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#message ⇒ Object
Returns the value of attribute message.
-
#number ⇒ Object
Returns the value of attribute number.
Instance Method Summary collapse
- #confirm(number) ⇒ Object
- #deliver_message(message, number) ⇒ Object
-
#initialize ⇒ Request
constructor
A new instance of Request.
- #unblock(number) ⇒ Object
Constructor Details
#initialize ⇒ Request
Returns a new instance of Request.
76 77 78 79 80 81 |
# File 'lib/gateway_4info.rb', line 76 def initialize unless Txter.configured? raise "You need to configure Txter before using it!" end self.config = Txter.configuration end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
74 75 76 |
# File 'lib/gateway_4info.rb', line 74 def config @config end |
#message ⇒ Object
Returns the value of attribute message.
73 74 75 |
# File 'lib/gateway_4info.rb', line 73 def @message end |
#number ⇒ Object
Returns the value of attribute number.
72 73 74 |
# File 'lib/gateway_4info.rb', line 72 def number @number end |
Instance Method Details
#confirm(number) ⇒ Object
90 91 92 93 94 |
# File 'lib/gateway_4info.rb', line 90 def confirm(number) self.number = Txter.internationalize(number) template(:confirm).render(self) end |
#deliver_message(message, number) ⇒ Object
83 84 85 86 87 88 |
# File 'lib/gateway_4info.rb', line 83 def (, number) self.number = Txter.internationalize(number) self. = template(:deliver).render(self) end |
#unblock(number) ⇒ Object
96 97 98 99 100 |
# File 'lib/gateway_4info.rb', line 96 def unblock(number) self.number = Txter.internationalize(number) template(:unblock).render(self) end |