Class: ZLocalize::SymbolExpression

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

Overview

a Symbol Expression

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



157
158
159
160
161
162
163
164
165
# File 'lib/zlocalize/rdoc_source_parser.rb', line 157

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



167
168
169
# File 'lib/zlocalize/rdoc_source_parser.rb', line 167

def to_entry_string
  "\"(symbol #{@name})\"".force_encoding("UTF-8")
end