Class: Rundown::Words

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/rundown/words.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Words

Returns a new instance of Words.



5
6
7
8
# File 'lib/rundown/words.rb', line 5

def initialize(text)
  @text = text
  __setobj__(text.split(" "))
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/rundown/words.rb', line 3

def text
  @text
end