Class: ProgramR::Template

Inherits:
AimlTag
  • Object
show all
Defined in:
lib/programr/aiml_elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AimlTag

#to_s

Constructor Details

#initializeTemplate


65
66
67
# File 'lib/programr/aiml_elements.rb', line 65

def initialize
  @value = []
end

Instance Attribute Details

#valueObject

Returns the value of attribute value


63
64
65
# File 'lib/programr/aiml_elements.rb', line 63

def value
  @value
end

Instance Method Details

#add(anObj) ⇒ Object


69
70
71
# File 'lib/programr/aiml_elements.rb', line 69

def add anObj
  @value << anObj
end

#append(aString) ⇒ Object


73
74
75
# File 'lib/programr/aiml_elements.rb', line 73

def append aString
  @value << aString.gsub(/\s+/, ' ')
end

#inspectObject


77
78
79
# File 'lib/programr/aiml_elements.rb', line 77

def inspect
  @value.map(&:inspect)
end