Class: CXML::Sender
- Inherits:
-
Object
- Object
- CXML::Sender
- Defined in:
- lib/cxml/sender.rb
Instance Attribute Summary collapse
-
#credential ⇒ Object
Returns the value of attribute credential.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Sender
constructor
A new instance of Sender.
- #render(node) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Sender
Returns a new instance of Sender.
6 7 8 9 10 11 |
# File 'lib/cxml/sender.rb', line 6 def initialize(data={}) if data.kind_of?(Hash) && !data.empty? @credential = CXML::Credential.new(data['Credential']) @user_agent = data['UserAgent'] end end |
Instance Attribute Details
#credential ⇒ Object
Returns the value of attribute credential.
3 4 5 |
# File 'lib/cxml/sender.rb', line 3 def credential @credential end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
4 5 6 |
# File 'lib/cxml/sender.rb', line 4 def user_agent @user_agent end |
Instance Method Details
#render(node) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/cxml/sender.rb', line 13 def render(node) node.Sender do |n| n.UserAgent(@user_agent) @credential.render(n) end node end |