class CPEE::Properties::PatchItems

Public Class Methods

set(item, id, opts, xml) click to toggle source
# File lib/cpee/implementation_properties.rb, line 358
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) click to toggle source
# File lib/cpee/implementation_properties.rb, line 355
def self::set_hash(item, id, opts, val)
  CPEE::Persistence::set_list(id,opts,item,val)
end

Public Instance Methods

response() click to toggle source
# File lib/cpee/implementation_properties.rb, line 366
def response
  item = @a[0]
  id = @a[1]
  opts = @a[2]
  if opts[:statemachine].readonly? id
    @status = 423
  else
    begin
      PatchItems::set(item,id,opts,@p[0].value.read)
    rescue
      @status = 400
    end
  end
  nil
end