Class: CPEE::Properties::PatchItems
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Properties::PatchItems
- Defined in:
- lib/cpee/implementation_properties.rb
Overview
}}}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.set(item, id, opts, xml) ⇒ Object
398 399 400 401 402 403 404 |
# File 'lib/cpee/implementation_properties.rb', line 398 def self::set(item, id, opts, xml) doc = XML::Smart::string(xml) val = doc.find("/*/*").map do |ele| [ele.qname.name, ele.text] end.to_h CPEE::Persistence::set_list(id,opts,item,val) end |
.set_hash(item, id, opts, val) ⇒ Object
{{{
395 396 397 |
# File 'lib/cpee/implementation_properties.rb', line 395 def self::set_hash(item, id, opts, val) CPEE::Persistence::set_list(id,opts,item,val) end |
Instance Method Details
#response ⇒ Object
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/cpee/implementation_properties.rb', line 406 def response item = @a[0] id = @a[1] opts = @a[2] if opts[:statemachine].readonly? id @status = 423 elsif opts[:statemachine].final? id @status = 410 else begin PatchItems::set(item,id,opts,@p[0].value.read) rescue @status = 400 end end nil end |