Class: Attentive::Phrase

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/attentive/phrase.rb

Instance Method Summary collapse

Constructor Details

#initialize(tokens) ⇒ Phrase

Returns a new instance of Phrase.



6
7
8
# File 'lib/attentive/phrase.rb', line 6

def initialize(tokens)
  super tokens
end

Instance Method Details

#dupObject



18
19
20
# File 'lib/attentive/phrase.rb', line 18

def dup
  self.class.new map(&:dup)
end

#inspectObject



14
15
16
# File 'lib/attentive/phrase.rb', line 14

def inspect
  map(&:inspect).join("\n")
end

#to_sObject



10
11
12
# File 'lib/attentive/phrase.rb', line 10

def to_s
  join
end