Module: GetText::PoMessageForRubyParser
- Included in:
- PoMessage
- Defined in:
- lib/gettext/tools/parser/ruby.rb
Overview
Extends PoMessage for RubyParser. Implements a sort of state machine to assist the parser.
Instance Method Summary collapse
- #advance_to_next_attribute ⇒ Object
- #init_param ⇒ Object
-
#set_current_attribute(str) ⇒ Object
Supports parsing by setting attributes by and by.
Instance Method Details
#advance_to_next_attribute ⇒ Object
97 98 99 |
# File 'lib/gettext/tools/parser/ruby.rb', line 97 def advance_to_next_attribute @param_number += 1 end |
#init_param ⇒ Object
92 93 94 95 |
# File 'lib/gettext/tools/parser/ruby.rb', line 92 def init_param @param_number = 0 self end |
#set_current_attribute(str) ⇒ Object
Supports parsing by setting attributes by and by.
86 87 88 89 90 |
# File 'lib/gettext/tools/parser/ruby.rb', line 86 def set_current_attribute(str) param = @param_type[@param_number] raise ParseError, 'no more string parameters expected' unless param set_value(param, str) end |