Class: Grammar::T

Inherits:
Object
  • Object
show all
Defined in:
lib/zipf/grammar.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(word) ⇒ T

Returns a new instance of T.



7
8
9
# File 'lib/zipf/grammar.rb', line 7

def initialize word
  @word = word
end

Instance Attribute Details

#wordObject

Returns the value of attribute word.



5
6
7
# File 'lib/zipf/grammar.rb', line 5

def word
  @word
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/zipf/grammar.rb', line 11

def to_s
  "T<#{@word}>"
end