examples/general/SRL/lib/regex/char_class.rb in rley-0.5.11 vs examples/general/SRL/lib/regex/char_class.rb in rley-0.5.12

- old
+ new

@@ -16,13 +16,14 @@ def initialize(to_negate,*theChildren) super(theChildren) @negated = to_negate end - public + protected + # Conversion method re-definition. # Purpose: Return the String representation of the character class. - def to_str() + def text_repr() result_children = children.inject('') do |subResult, aChild| if aChild.kind_of?(Regex::Character) && Metachars.include?(aChild.codepoint) subResult << "\\" # Escape meta-character... end subResult << aChild.to_str() \ No newline at end of file