Class: WeChat::Bot::HTTP::MimeType::XML
- Inherits:
-
HTTP::MimeType::Adapter
- Object
- HTTP::MimeType::Adapter
- WeChat::Bot::HTTP::MimeType::XML
- Defined in:
- lib/wechat/bot/http/adapter/xml.rb
Overview
XML 代码解析 提示:不可逆转
Instance Method Summary collapse
-
#decode(str) ⇒ Hash
转换 XML 代码为 Hash.
-
#encode(_) ⇒ Object
Encodes object to js.
Instance Method Details
#decode(str) ⇒ Hash
转换 XML 代码为 Hash
20 21 22 |
# File 'lib/wechat/bot/http/adapter/xml.rb', line 20 def decode(str) MultiXml.parse(str) end |
#encode(_) ⇒ Object
Encodes object to js
13 14 15 |
# File 'lib/wechat/bot/http/adapter/xml.rb', line 13 def encode(_) "" # NO NEED encode end |