Class: CXML::Response
- Inherits:
-
Object
- Object
- CXML::Response
- Defined in:
- lib/cxml/response.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Response
constructor
A new instance of Response.
- #render(node) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Response
Returns a new instance of Response.
12 13 14 15 16 |
# File 'lib/cxml/response.rb', line 12 def initialize(data={}) if data.kind_of?(Hash) && !data.empty? @status = CXML::Status.new(data['Status']) end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/cxml/response.rb', line 9 def id @id end |
#status ⇒ Object
Returns the value of attribute status.
10 11 12 |
# File 'lib/cxml/response.rb', line 10 def status @status end |
Instance Method Details
#render(node) ⇒ Object
18 19 20 21 22 |
# File 'lib/cxml/response.rb', line 18 def render(node) = {:id => @id} .keep_if { |k,v| !v.nil? } node.Response() { |n| @status.render(n) } end |