Class: KuportView
Overview
TODO
Constant Summary
Constants inherited from Kuport
Instance Method Summary collapse
Methods inherited from Kuport
#agent, #cookies_clear, #cookies_load, #cookies_save, #download_file, #download_with_json, filter, #find_links, #get_module, #initialize, #loggedin?, #login, #login_cookie, #login_passwd, #materials, #menu_links, #messages, #messages_backno, #messages_read, module_url, parse, #timetable
Methods included from Kuport::Helper
#clear_proxy_env_var, #color_str, #escape_filename, #get_page_doc, #get_proxy_env_var, #input_num, #input_passwd, #parse_proxy_str, #quit, #to_abs_url
Constructor Details
This class inherits a constructor from Kuport
Instance Method Details
#select_menu ⇒ Object
9 10 11 12 13 |
# File 'lib/kuport/view.rb', line 9 def num = input_num("[0..#{@@menu_items.size-1}]> ") send([num]) rescue nil end |
#show_menu ⇒ Object
3 4 5 6 7 |
# File 'lib/kuport/view.rb', line 3 def @@menu_items.each_with_index do |(key,value), i| print "%1d %s\n" % [i, value] end end |
#show_messages ⇒ Object
15 16 17 18 19 |
# File 'lib/kuport/view.rb', line 15 def .each_with_index do |mes, i| print "%3d %s\n" % [i, mes] end end |