Sha256: f68a278b308880088a0d595f472e10562c617b0c7707ccc36bccf8733f3bb5b5

Contents?: true

Size: 279 Bytes

Versions: 10

Compression:

Stored size: 279 Bytes

Contents

require "delegate"

module Attentive
  class Phrase < SimpleDelegator

    def initialize(tokens)
      super tokens
    end

    def to_s
      join
    end

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

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

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
attentive-0.3.9 lib/attentive/phrase.rb
attentive-0.3.8 lib/attentive/phrase.rb
attentive-0.3.7 lib/attentive/phrase.rb
attentive-0.3.6 lib/attentive/phrase.rb
attentive-0.3.5 lib/attentive/phrase.rb
attentive-0.3.4 lib/attentive/phrase.rb
attentive-0.3.3 lib/attentive/phrase.rb
attentive-0.3.2 lib/attentive/phrase.rb
attentive-0.3.1 lib/attentive/phrase.rb
attentive-0.3.0 lib/attentive/phrase.rb