Class: Wintr::WordArray
- Inherits:
-
Object
- Object
- Wintr::WordArray
- Defined in:
- lib/wintr/word_array.rb
Instance Method Summary collapse
-
#initialize(array) ⇒ WordArray
constructor
A new instance of WordArray.
- #to_w ⇒ Object
Constructor Details
#initialize(array) ⇒ WordArray
Returns a new instance of WordArray.
3 4 5 |
# File 'lib/wintr/word_array.rb', line 3 def initialize(array) @array = array end |
Instance Method Details
#to_w ⇒ Object
7 8 9 |
# File 'lib/wintr/word_array.rb', line 7 def to_w @array.join(' ').squeeze(' ').strip end |