Class: VimColor::Format_xml

Inherits:
Object
  • Object
show all
Defined in:
lib/msgpack/idl/command/vimcolor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFormat_xml

Returns a new instance of Format_xml.



151
152
153
# File 'lib/msgpack/idl/command/vimcolor.rb', line 151

def initialize
	@result = ''
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



159
160
161
# File 'lib/msgpack/idl/command/vimcolor.rb', line 159

def result
  @result
end

Instance Method Details

#push(type, text) ⇒ Object



154
155
156
157
158
# File 'lib/msgpack/idl/command/vimcolor.rb', line 154

def push(type, text)
	VimColor._escape_xml!(text)
	type = 'Normal' if type.empty?
	@result << %[<#{type}>#{text}</#{type}>]
end