Class: ZLocalize::NumberExpression

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

Overview

a Number 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



138
139
140
141
142
143
144
145
146
# File 'lib/zlocalize/rdoc_source_parser.rb', line 138

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



148
149
150
# File 'lib/zlocalize/rdoc_source_parser.rb', line 148

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