LoremKnight 2.7.0 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tiger.rb +36 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b6b7fc310653a8f8fa9d8bbd29728109723787d
|
4
|
+
data.tar.gz: 33df82adc5e3672d0268b344efde85c604218d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9391a06c32c7867b4a8c97b0df3429b568673b2db8adf8502942ec1163aeb71bfb652d04a17d6f769f18e0086302e6824c6241f1676e85a43db986ac22568303
|
7
|
+
data.tar.gz: 694d4236bcfc9eb2b5ce22b0adf5302cd392cc73013a11b17f3409d9e98be1495c316ee285cc1c3e9ce0c853e1fd50fc14d9cfbbe40477f7c902eb9484e422e7
|
data/lib/tiger.rb
CHANGED
@@ -6,6 +6,7 @@ class Tiger
|
|
6
6
|
@content = ""
|
7
7
|
@paragraphStandartSize = 70;
|
8
8
|
@sentenceStandartSize = 7;
|
9
|
+
@listStandartSize = 5;
|
9
10
|
@wordLength = 20;
|
10
11
|
|
11
12
|
@contentType = "RAW"
|
@@ -28,6 +29,14 @@ class Tiger
|
|
28
29
|
lorem(paragraphN,@paragraphStandartSize,'')
|
29
30
|
end
|
30
31
|
|
32
|
+
def self.getList(listN)
|
33
|
+
lists = ""
|
34
|
+
listN.to_i.times do
|
35
|
+
lists += generateList
|
36
|
+
end
|
37
|
+
return lists
|
38
|
+
end
|
39
|
+
|
31
40
|
def self.getWords(wordN)
|
32
41
|
@words = ""
|
33
42
|
@wordArray = @words.split(" ")
|
@@ -40,28 +49,20 @@ class Tiger
|
|
40
49
|
return @words;
|
41
50
|
end
|
42
51
|
|
43
|
-
def self.
|
44
|
-
|
45
|
-
@sentenceStandartSize = size.to_i
|
46
|
-
else
|
47
|
-
puts "Value can not be less or equal to 0"
|
48
|
-
end
|
52
|
+
def self.setSentenceSize(size)
|
53
|
+
@sentenceStandartSize = size.to_i > 0 ? size.to_i : @sentenceStandartSize;
|
49
54
|
end
|
50
55
|
|
51
|
-
def self.
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
56
|
+
def self.setParagraphSize(size)
|
57
|
+
@paragraphStandartSize = size.to_i > 0 ? size.to_i : @paragraphStandartSize;
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.setListSize(size)
|
61
|
+
@listStandartSize = size.to_i > 0 ? size.to_i : @listStandartSize;
|
57
62
|
end
|
58
63
|
|
59
64
|
def self.setWordMaximumLength(length)
|
60
|
-
|
61
|
-
@wordLength = length.to_i
|
62
|
-
else
|
63
|
-
puts "Value can not be less than or equal to 0"
|
64
|
-
end
|
65
|
+
@wordLength = length.to_i > 0 ? length.to_i : @wordLength;
|
65
66
|
end
|
66
67
|
|
67
68
|
def self.setContentType(type)
|
@@ -99,3 +100,21 @@ def lorem(header,body,startWith = '')
|
|
99
100
|
return @sentence
|
100
101
|
|
101
102
|
end
|
103
|
+
|
104
|
+
def generateList
|
105
|
+
@preSentence = @hasPreSentence == true ? "რომელმან შექმნა სამყარო" : ""
|
106
|
+
|
107
|
+
list = "<ul><li>"
|
108
|
+
randomSize = rand(20) #setRandBound
|
109
|
+
|
110
|
+
@listStandartSize.times do |x|
|
111
|
+
list += " #{@preSentence}"
|
112
|
+
randomSize.times do |y|
|
113
|
+
list += y != randomSize-1 ? " #{@content[rand(@content.size-1)]}" : " #{@content[rand(@content.size-1)]}</li>"
|
114
|
+
end
|
115
|
+
list += x != @listStandartSize-1 ? "<li>" : "</ul><br><br>"
|
116
|
+
end
|
117
|
+
|
118
|
+
return list
|
119
|
+
|
120
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LoremKnight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guga katsiashvili
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'lorem generating words from georgian epic poem : The Knight in the Panther''s
|
14
14
|
Skin'
|