Class: SmsBroker::Client::Base
- Inherits:
-
Object
- Object
- SmsBroker::Client::Base
- Defined in:
- lib/sms_broker/client/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#phone_number ⇒ Object
readonly
Returns the value of attribute phone_number.
-
#sender_id ⇒ Object
readonly
Returns the value of attribute sender_id.
Instance Method Summary collapse
-
#initialize(name, client, options = {}) ⇒ Base
constructor
A new instance of Base.
- #serialize_to_number(number) ⇒ Object
Constructor Details
#initialize(name, client, options = {}) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 |
# File 'lib/sms_broker/client/base.rb', line 9 def initialize(name, client, = {}) @name = name @client = client @sender_id = [:sender_id] @phone_number = [:phone_number] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/sms_broker/client/base.rb', line 4 def client @client end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sms_broker/client/base.rb', line 4 def name @name end |
#phone_number ⇒ Object (readonly)
Returns the value of attribute phone_number.
4 5 6 |
# File 'lib/sms_broker/client/base.rb', line 4 def phone_number @phone_number end |
#sender_id ⇒ Object (readonly)
Returns the value of attribute sender_id.
4 5 6 |
# File 'lib/sms_broker/client/base.rb', line 4 def sender_id @sender_id end |
Instance Method Details
#serialize_to_number(number) ⇒ Object
16 17 18 19 20 |
# File 'lib/sms_broker/client/base.rb', line 16 def serialize_to_number(number) return number if number.start_with?('+') "+#{number}" end |