Method: WSDSL::Response#element
- Defined in:
- lib/response.rb
#element(opts = {}) {|WSDSL::Response::Element| ... } ⇒ WSDSL::Response::Element
Defines a new element and yields the content of an optional block Each new element is then stored in the elements array.
58 59 60 61 62 63 |
# File 'lib/response.rb', line 58 def element(opts={}) el = Element.new(opts[:name], opts[:type]) yield(el) if block_given? @elements << el el end |