wordsoup 0.1.5 → 0.1.6
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/bible.txt +1831 -1831
- data/lib/wordsoup.rb +5 -28
- data/lib/wordsoup/version.rb +1 -1
- metadata +1 -1
data/lib/wordsoup.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
require "wordsoup/version"
|
2
2
|
|
3
3
|
module Wordsoup
|
4
|
-
class Author
|
5
4
|
|
5
|
+
class Author
|
6
|
+
|
6
7
|
attr_accessor :sentences, :word_hash, :first_words, :last_words
|
7
8
|
|
8
9
|
def initialize(file)
|
@@ -75,32 +76,8 @@ module Wordsoup
|
|
75
76
|
|
76
77
|
end
|
77
78
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
super(file)
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
class Hemingway < Author
|
87
|
-
|
88
|
-
def initialize(file = File.join( File.dirname(__FILE__), './omats.txt'))
|
89
|
-
super(file)
|
90
|
-
end
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
class Bible < Author
|
95
|
-
|
96
|
-
def initialize(file = File.join( File.dirname(__FILE__), './bible.txt'))
|
97
|
-
super(file)
|
98
|
-
end
|
99
|
-
|
100
|
-
end
|
101
|
-
|
102
|
-
Shakespeare = Shakespeare.new
|
103
|
-
Hemingway = Hemingway.new
|
104
|
-
Bible = Bible.new
|
79
|
+
Shakespeare = Author.new( File.join( File.dirname(__FILE__), './hamlet.txt'))
|
80
|
+
Hemingway = Author.new(File.join( File.dirname(__FILE__), './omats.txt'))
|
81
|
+
Bible = Author.new(File.join( File.dirname(__FILE__), './bible.txt'))
|
105
82
|
|
106
83
|
end
|
data/lib/wordsoup/version.rb
CHANGED