module ConfirmationCode
Constants
- VERSION
Attributes
password[R]
username[R]
Public Instance Methods
account()
click to toggle source
# File lib/confirmation_code.rb, line 29 def account @service.account default_options if @service end
recognition_error(yzm_id)
click to toggle source
# File lib/confirmation_code.rb, line 33 def recognition_error(yzm_id) @service.recognition_error yzm_id, default_options if @service end
upload(image_path, options = {})
click to toggle source
# File lib/confirmation_code.rb, line 20 def upload(image_path, options = {}) options = default_options.merge options if image_path.start_with?('http') @service.upload image_path, options if @service else @service.upload_local image_path, options if @service end end
use(service, username, password, options = {})
click to toggle source
# File lib/confirmation_code.rb, line 12 def use(service, username, password, options = {}) @service = ConfirmationCode::Service.const_get("#{service.to_s.capitalize}") @service.set_extra_options(options) @username = username @password = password @service end
Private Instance Methods
default_options()
click to toggle source
# File lib/confirmation_code.rb, line 39 def default_options { user_name: @username, user_pw: @password, } end