Class: CPEE::Properties::PatchPositions
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Properties::PatchPositions
- Defined in:
- lib/cpee/implementation_properties.rb
Overview
}}}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.set(id, opts, xml) ⇒ Object
{{{
557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/cpee/implementation_properties.rb', line 557 def self::set(id,opts,xml) doc = XML::Smart::string(xml) content = {} doc.find("/*/*").map do |ele| val = { 'position' => ele.qname.name } val['passthrough'] = ele.attributes['passthrough'] if ele.attributes['passthrough'] content[ele.text] ||= [] content[ele.text] << val end CPEE::Persistence::set_item(id,opts,'position',content) end |
Instance Method Details
#response ⇒ Object
569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/cpee/implementation_properties.rb', line 569 def response id = @a[0] opts = @a[1] if opts[:statemachine].readonly? id @status = 423 elsif opts[:statemachine].final? id @status = 410 else begin PatchPositions::set(id,opts,@p[0].value.read) rescue => e @status = 400 end end nil end |