Module: ChinaSMS
- Extended by:
- ChinaSMS
- Included in:
- ChinaSMS
- Defined in:
- lib/china_sms.rb,
lib/china_sms/version.rb,
lib/china_sms/service/emay.rb,
lib/china_sms/service/tui3.rb,
lib/china_sms/service/smsbao.rb,
lib/china_sms/service/chanyoo.rb
Defined Under Namespace
Modules: Service
Constant Summary collapse
- VERSION =
"0.0.5"
Instance Method Summary collapse
- #clear ⇒ Object
- #get ⇒ Object
- #password ⇒ Object
- #to(receiver, content) ⇒ Object
- #use(service, options) ⇒ Object
- #username ⇒ Object
Instance Method Details
#clear ⇒ Object
33 34 35 |
# File 'lib/china_sms.rb', line 33 def clear @service = @username = @password = nil end |
#get ⇒ Object
29 30 31 |
# File 'lib/china_sms.rb', line 29 def get @service.get username: @username, password: @password if @service end |
#password ⇒ Object
15 16 17 |
# File 'lib/china_sms.rb', line 15 def password @password end |
#to(receiver, content) ⇒ Object
25 26 27 |
# File 'lib/china_sms.rb', line 25 def to(receiver, content) @service.to receiver, content, username: @username, password: @password if @service end |
#use(service, options) ⇒ Object
19 20 21 22 23 |
# File 'lib/china_sms.rb', line 19 def use(service, ) @service = ChinaSMS::Service.const_get("#{service.to_s.capitalize}") @username = [:username] @password = [:password] end |
#username ⇒ Object
11 12 13 |
# File 'lib/china_sms.rb', line 11 def username @username end |