Method: WeChat::Menu#to_we_chat_data
- Defined in:
- lib/we_chat/menu.rb
#to_we_chat_data ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/we_chat/menu.rb', line 8 def to_we_chat_data result = {} result[:name] = self.name if self.top_node? result[:sub_button] = children_to_we_chat_data else result[:type] = self. if self.view? result[:url] = self. else result[:key] = self. end end result end |