Class: Wc::Engine
- Inherits:
-
Object
- Object
- Wc::Engine
- Defined in:
- lib/wc/engine.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Engine
constructor
A new instance of Engine.
Constructor Details
#initialize(options = {}) ⇒ Engine
Returns a new instance of Engine.
5 6 7 |
# File 'lib/wc/engine.rb', line 5 def initialize(={}) end |
Class Method Details
.read_from_file(filename) ⇒ Object
9 10 11 |
# File 'lib/wc/engine.rb', line 9 def self.read_from_file(filename) Array(Wc::Reader.read(filename)).sort { |one, two| -(one[1] <=> two[1]) } end |
.read_inline(a_text) ⇒ Object
13 14 15 |
# File 'lib/wc/engine.rb', line 13 def self.read_inline(a_text) Array(Wc::Reader.consume(a_text)).sort { |one, two| -(one[1] <=> two[1]) } end |