Module: ConfirmationCode
- Extended by:
- ConfirmationCode
- Included in:
- ConfirmationCode, Service::Damatu, Service::Lianzhong
- Defined in:
- lib/confirmation_code.rb,
lib/confirmation_code/version.rb,
lib/confirmation_code/service/damatu.rb,
lib/confirmation_code/service/lianzhong.rb
Defined Under Namespace
Modules: Service
Constant Summary collapse
- VERSION =
"0.0.6"
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #account ⇒ Object
- #recognition_error(yzm_id) ⇒ Object
- #upload(image_url, options = {}) ⇒ Object
- #use(service, username, password, options = {}) ⇒ Object
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
10 11 12 |
# File 'lib/confirmation_code.rb', line 10 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
10 11 12 |
# File 'lib/confirmation_code.rb', line 10 def username @username end |
Instance Method Details
#account ⇒ Object
25 26 27 |
# File 'lib/confirmation_code.rb', line 25 def account @service.account if @service end |
#recognition_error(yzm_id) ⇒ Object
29 30 31 |
# File 'lib/confirmation_code.rb', line 29 def recognition_error(yzm_id) @service.recognition_error yzm_id, if @service end |
#upload(image_url, options = {}) ⇒ Object
20 21 22 23 |
# File 'lib/confirmation_code.rb', line 20 def upload(image_url, = {}) = .merge @service.upload image_url, if @service end |
#use(service, username, password, options = {}) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/confirmation_code.rb', line 12 def use(service, username, password, = {}) @service = ConfirmationCode::Service.const_get("#{service.to_s.capitalize}") @service.() @username = username @password = password @service end |