Class: VimColor::Format_xml
- Inherits:
-
Object
- Object
- VimColor::Format_xml
- Defined in:
- lib/msgpack/idl/command/vimcolor.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize ⇒ Format_xml
constructor
A new instance of Format_xml.
- #push(type, text) ⇒ Object
Constructor Details
#initialize ⇒ Format_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
#result ⇒ Object (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 |