Class: MyApp
- Inherits:
-
AppMainBase
- Object
- AppMainBase
- MyApp
- Defined in:
- lib/template/my_app_sample.rb
Instance Method Summary collapse
Methods inherited from AppMainBase
#add_history, #app_send, #initialize, #resume, #set_config, #set_ws, #suspend
Constructor Details
This class inherits a constructor from AppMainBase
Instance Method Details
#start(argv) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/template/my_app_sample.rb', line 5 def start(argv) super begin @abort = false puts argv argv.each do |v| yield v if block_given? end # Browserにメッセージ送信 app_send("popup:start app #{argv[0]}") # 履歴の保存 add_history("history.json", argv[0]) while true yield Time.now.to_s if block_given? puts Time.now.to_s yield @config["name1"] sleep 1 break if @abort end rescue puts $! puts $@ end end |
#stop ⇒ Object
33 34 35 |
# File 'lib/template/my_app_sample.rb', line 33 def stop() super end |