Class: Actir::CookiesFile
- Inherits:
-
Object
- Object
- Actir::CookiesFile
- Defined in:
- lib/actir/script/cookies_file.rb
Class Method Summary collapse
- .exists? ⇒ Boolean
- .name ⇒ Object
-
.path ⇒ Object
获取cookies文件的路径 因为涉及到权限问题,路径需要放在个人账号目录下 通过whoami命令获取当前账户名称 暂时存放在/User/xx/目录下.
Class Method Details
.exists? ⇒ Boolean
18 19 20 |
# File 'lib/actir/script/cookies_file.rb', line 18 def exists? File::exists?(path + name) end |
.name ⇒ Object
14 15 16 |
# File 'lib/actir/script/cookies_file.rb', line 14 def name return "cookies.yaml" end |
.path ⇒ Object
获取cookies文件的路径 因为涉及到权限问题,路径需要放在个人账号目录下 通过whoami命令获取当前账户名称 暂时存放在/User/xx/目录下
9 10 11 12 |
# File 'lib/actir/script/cookies_file.rb', line 9 def path user_name = `whoami` return "/Users/" + user_name + "/" end |