Module: ConfirmationCode
- Extended by:
- ConfirmationCode
- Included in:
- ConfirmationCode, Service::Lianzhong
- Defined in:
- lib/confirmation_code.rb,
lib/confirmation_code/version.rb,
lib/confirmation_code/service/lianzhong.rb
Defined Under Namespace
Modules: Service
Constant Summary collapse
- VERSION =
"0.0.4"
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, options = {}) ⇒ Object
- #upload(image_url, options = {}) ⇒ Object
- #use(service, username, password) ⇒ 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
24 25 26 |
# File 'lib/confirmation_code.rb', line 24 def account @service.account if @service end |
#recognition_error(yzm_id, options = {}) ⇒ Object
28 29 30 31 32 |
# File 'lib/confirmation_code.rb', line 28 def recognition_error(yzm_id, = {}) ['yzm_id'] = yzm_id = .merge @service.recognition_error if @service end |
#upload(image_url, options = {}) ⇒ Object
19 20 21 22 |
# File 'lib/confirmation_code.rb', line 19 def upload(image_url, = {}) = .merge @service.upload image_url, if @service end |
#use(service, username, password) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/confirmation_code.rb', line 12 def use(service, username, password) @service = ConfirmationCode::Service.const_get("#{service.to_s.capitalize}") @username = username @password = password @service end |