Class: LoremIpsumAmet::Word
- Inherits:
-
Object
- Object
- LoremIpsumAmet::Word
- Defined in:
- lib/lorem_ipsum_amet/word.rb
Instance Method Summary collapse
-
#initialize(base, words, join_element) ⇒ Word
constructor
A new instance of Word.
- #text ⇒ Object
Constructor Details
#initialize(base, words, join_element) ⇒ Word
Returns a new instance of Word.
4 5 6 7 8 |
# File 'lib/lorem_ipsum_amet/word.rb', line 4 def initialize(base, words, join_element) @base = base @words = words @join_element = join_element end |
Instance Method Details
#text ⇒ Object
10 11 12 |
# File 'lib/lorem_ipsum_amet/word.rb', line 10 def text joined_text.gsub(/\s+\$JOIN\s+/, join_element) end |