Module: ChaWork::Message

Defined in:
lib/cha_work/msg.rb

Instance Method Summary collapse

Instance Method Details

#hide_msgObject



19
20
21
# File 'lib/cha_work/msg.rb', line 19

def hide_msg
  SVProgressHUD.dismiss
end

#msg(text, type = :normal) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cha_work/msg.rb', line 5

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

#wait_msgObject



23
# File 'lib/cha_work/msg.rb', line 23

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