Class: Riddl::Utils::Properties::Properties
- Inherits:
-
Implementation
- Object
- Implementation
- Riddl::Utils::Properties::Properties
- Defined in:
- lib/ruby/riddl/utils/properties.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Methods inherited from Implementation
#headers, #initialize, #status
Constructor Details
This class inherits a constructor from Riddl::Implementation
Instance Method Details
#response ⇒ Object
{{{
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/ruby/riddl/utils/properties.rb', line 152 def response backend = @a[0] handler = @a[1] EM.defer{handler.read} unless handler.nil? ret = XML::Smart.string("<properties xmlns=\"http://riddl.org/ns/common-patterns/properties/1.0\"/>") backend.schema.find("/p:properties/*[name()!='optional']|/p:properties/p:optional/*").each do |r| ret.root.add("property",r.qname.to_s) end return Riddl::Parameter::Complex.new("keys","text/xml",ret.to_s) end |