Class: CPEE::Logging::Subscriptions
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Logging::Subscriptions
- Defined in:
- lib/cpee-logging-xes-yaml/implementation.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Instance Method Details
#response ⇒ Object
{{{
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/cpee-logging-xes-yaml/implementation.rb', line 282 def response opts = @a[0] Riddl::Parameter::Complex.new('subscriptions','text/xml') do ret = XML::Smart::string <<-END <subscriptions xmlns='http://riddl.org/ns/common-patterns/notifications-producer/2.0'/> END Dir.glob(File.join(opts[:notifications_dir],'*','subscription.xml')).each do |f| ret.root.add('subscription').tap do |n| n.attributes['id'] = File.basename(File.dirname(f)) XML::Smart.open_unprotected(f) do |doc| n.attributes['url'] = doc.root.attributes['url'] end end end ret.to_s end end |