wxl_function 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/wxl_function.rb +28 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2c4645d564958770e61231e3199ddbf041cf713b9bc1b8efd45e7ed084f594eb
4
+ data.tar.gz: 8851ca25a6c9b5818febefdccb4184694574a229a470d92cac5e2f16ad5e8f4c
5
+ SHA512:
6
+ metadata.gz: 5bf706cfd75000af2691e8dac582fe225c37f4bf25fb08dd0601a52e06d0d89b7f169b0a8d710759cc33f16c32b1846658840b42b19aab8bcabe3e9b8546b253
7
+ data.tar.gz: 5aab719f39bd873df59a895a649863a1d8e4b53056869c3492d0ffb2013cb7592218d112f3db7eeceb68a0b3ef9e31ab2abc503dc8c78710ced22250f4927062
data/wxl_function.rb ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ module M_公共函数
5
+
6
+ def 退出消息(消息)
7
+ puts "#{消息}"
8
+ exit
9
+ end
10
+
11
+ def 随机字符串(长度=3)
12
+ arr=("a".."z").to_a
13
+ char=''
14
+ 长度.times {
15
+ char += arr[Random.new.rand(26)]
16
+ }
17
+ char
18
+ end
19
+
20
+ def 随机数字(最大值=100)
21
+ Random.new.rand 最大值
22
+ end
23
+
24
+ module_function :退出消息,:随机字符串,:随机数字
25
+ end
26
+
27
+ #p M_公共函数.随机字符串
28
+ #p M_公共函数.随机数字 1000
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wxl_function
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - wxl
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 公共函数方便调用
14
+ email: wangxl_bj2008@foxmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - wxl_function.rb
20
+ homepage: http://rubygems.org/gems/wxl_function
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.7.6
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: 公共函数
44
+ test_files: []