Class: ZLocalize::StringExpression

Inherits:
IdentifierExpression show all
Defined in:
lib/zlocalize/rdoc_source_parser.rb

Overview

a String Expression (litteral occurence of a string)

Instance Attribute Summary

Attributes inherited from IdentifierExpression

#name, #parameters

Attributes inherited from Expression

#char_no, #line_no, #sub_method, #text

Instance Method Summary collapse

Methods inherited from IdentifierExpression

#initialize, #to_translation_entry

Methods inherited from Expression

#initialize, #is_translate_call, #prefix, #set_text, #to_translation_entry

Constructor Details

This class inherits a constructor from ZLocalize::IdentifierExpression

Instance Method Details

#display(indent = 0) ⇒ Object

:nodoc: all



118
119
120
121
122
123
124
125
126
# File 'lib/zlocalize/rdoc_source_parser.rb', line 118

def display(indent = 0)
  i = prefix(indent)
  i << "#{self.class.name} (#{line_no},#{char_no}): #{@name}\n"
  unless @sub_method.nil?
    i << prefix(indent+1) + "sub-method:\n"
    i << @sub_method.display(indent+2)
  end
  i
end

#to_entry_stringObject



128
129
130
131
# File 'lib/zlocalize/rdoc_source_parser.rb', line 128

def to_entry_string
  ZLocalize.clean_ruby_string(@name).force_encoding("UTF-8")
  # @name
end