Class: Kwaff::Text
Instance Attribute Summary collapse
-
#escape ⇒ Object
Returns the value of attribute escape.
-
#str ⇒ Object
Returns the value of attribute str.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(translator, level = 0) ⇒ Object
-
#escape? ⇒ Boolean
def str return @escape ? Kwaff::escape(@str) : @str end.
-
#initialize(str, flag_escape = true) ⇒ Text
constructor
A new instance of Text.
Methods inherited from Node
Constructor Details
#initialize(str, flag_escape = true) ⇒ Text
Returns a new instance of Text.
88 89 90 91 |
# File 'lib/kwaff/node.rb', line 88 def initialize(str, flag_escape=true) @str = str @escape = flag_escape end |
Instance Attribute Details
#escape ⇒ Object
Returns the value of attribute escape.
92 93 94 |
# File 'lib/kwaff/node.rb', line 92 def escape @escape end |
#str ⇒ Object
Returns the value of attribute str.
92 93 94 |
# File 'lib/kwaff/node.rb', line 92 def str @str end |
Instance Method Details
#accept(translator, level = 0) ⇒ Object
85 86 87 |
# File 'lib/kwaff/node.rb', line 85 def accept(translator, level=0) return translator.translate_text(self, level) end |
#escape? ⇒ Boolean
96 97 98 |
# File 'lib/kwaff/node.rb', line 96 def escape? return @escape end |