lerolero 8.3.4 → 8.3.5
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.
- checksums.yaml +4 -4
- data/lib/lerolero.rb +21 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf0780022fe5a1616aa267115fe9f8c6da2e845f
|
4
|
+
data.tar.gz: 4eb845b7c0c499ca6877ef14e362142991c2fcaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7724ed4c3f592334c05e8af29f6f909f8d537208a4908c681b5e6abe5ce3c44ee8d5e3d06d21edd315451390d08ba04f1606a88b8f0227cf939d5bd5f8b058
|
7
|
+
data.tar.gz: f1e0abaefc1ff2cbd83b8d9e8776d557e1e3f537eac4dcbfaacda52beddb5c99c7587d1e101469fcaafff16637759baa095ace04e30351f6207bdafdd644bd14
|
data/lib/lerolero.rb
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
class Lerolero
|
2
|
+
@count=0
|
3
|
+
def initialize
|
4
|
+
trace=TracePoint.trace(:call) do |t|
|
5
|
+
@count += 1 if t.method_id == "produzirfraselerolero"
|
6
|
+
end
|
7
|
+
trace.enable
|
8
|
+
end
|
2
9
|
# Usage:Lerolero.produzirfraselerolero
|
3
10
|
# @param long_mailer_id truthy if the mailer ID is long (9 digits).
|
4
11
|
# @raise ArgumentError if invalid
|
5
|
-
def self.produzirfraselerolero
|
12
|
+
def self.produzirfraselerolero(*args)
|
6
13
|
myarray=[
|
7
14
|
"Caros amigos, ",
|
8
15
|
"Por outro lado, ",
|
@@ -133,8 +140,21 @@ myarray3=[
|
|
133
140
|
"do investimento em reciclagem técnica.",
|
134
141
|
"do remanejamento dos quadros funcionais."
|
135
142
|
]
|
143
|
+
case args.size
|
144
|
+
when 0
|
136
145
|
srand(Time.now.utc.to_i)
|
137
146
|
#myarray=[Time.now.utc.strftime('%s')]
|
147
|
+
myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample+ " "
|
148
|
+
when 1
|
149
|
+
srand(Time.now.utc.to_i+args[0])
|
150
|
+
#myarray=[Time.now.utc.strftime('%s')]
|
138
151
|
myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample
|
152
|
+
a=""
|
153
|
+
args[0].times do
|
154
|
+
a+=myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample+" "
|
155
|
+
end
|
156
|
+
a
|
157
|
+
end
|
158
|
+
|
139
159
|
end
|
140
160
|
end
|