wordsoup 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- class Shakespeare < Author
79
-
80
- def initialize(file = File.join( File.dirname(__FILE__), './hamlet.txt'))
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
@@ -1,3 +1,3 @@
1
1
  module Wordsoup
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordsoup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - DouglasTGordon