Class: AgentXmpp::View
- Inherits:
-
Object
- Object
- AgentXmpp::View
- Defined in:
- lib/agent_xmpp/app/view.rb
Overview
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
———————————————————————————————————.
-
#format ⇒ Object
readonly
———————————————————————————————————.
-
#params ⇒ Object
readonly
———————————————————————————————————.
Instance Method Summary collapse
-
#add_payload_to_container(payload) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
-
#initialize(connection, format, params) ⇒ View
constructor
.….….….….….….….….….….….….….….….….….….….….….….….….….….
Constructor Details
#initialize(connection, format, params) ⇒ View
.….….….….….….….….….….….….….….….….….….….….….….….….….….
12 13 14 15 16 |
# File 'lib/agent_xmpp/app/view.rb', line 12 def initialize(connection, format, params) @connection = connection @format = format @params = params end |
Instance Attribute Details
#connection ⇒ Object (readonly)
8 9 10 |
# File 'lib/agent_xmpp/app/view.rb', line 8 def connection @connection end |
#format ⇒ Object (readonly)
8 9 10 |
# File 'lib/agent_xmpp/app/view.rb', line 8 def format @format end |
#params ⇒ Object (readonly)
8 9 10 |
# File 'lib/agent_xmpp/app/view.rb', line 8 def params @params end |
Instance Method Details
#add_payload_to_container(payload) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….….….
19 20 21 22 23 24 25 |
# File 'lib/agent_xmpp/app/view.rb', line 19 def add_payload_to_container(payload) container_type = case format.xmlns when 'jabber:x:data' then :add_x_data_to_container when 'message:chat' then :add_chat_message_body_container end container_type.nil? ? nil : send(container_type, payload) end |