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

Instance Method Summary collapse

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password.



10
11
12
# File 'lib/confirmation_code.rb', line 10

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



10
11
12
# File 'lib/confirmation_code.rb', line 10

def username
  @username
end

Instance Method Details

#accountObject



24
25
26
# File 'lib/confirmation_code.rb', line 24

def 
  @service. default_options 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, options = {})
  options['yzm_id'] = yzm_id
  options = default_options.merge options
  @service.recognition_error options if @service
end

#upload(image_url, options = {}) ⇒ Object



19
20
21
22
# File 'lib/confirmation_code.rb', line 19

def upload(image_url, options = {})
  options = default_options.merge options
  @service.upload image_url, options 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