Sha256: c9e7a5e0ca7dff8dfed5e5f38c0f90c5f5625e79717fce100f8ce3a9a9b28737

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

# -*- encoding : utf-8 -*-
module ChaWork
  module Message

    def msg(text, type=:normal)
      type = text if text == :wait
      case type
      when :wait
        SVProgressHUD.showWithStatus(TEXT_WAIT)
      when :success
        SVProgressHUD.showSuccessWithStatus(text)
      when :failure
        SVProgressHUD.showErrorWithStatus(text)
      else
        SVProgressHUD.showWithStatus(text)
      end
    end

    def hide_msg
      SVProgressHUD.dismiss
    end

    def wait_msg; msg('请稍候'); end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cha_work-0.1 lib/cha_work/msg.rb