Sha256: 0a7fb460a600dc1a22022eded84fed087ddb0ea35b8b873efa70f57f8392830c

Contents?: true

Size: 1.72 KB

Versions: 27

Compression:

Stored size: 1.72 KB

Contents

# This file is part of CPEE.
# 
# CPEE is free software: you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
# 
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.  See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along with
# CPEE (file COPYING in the main directory).  If not, see
# <http://www.gnu.org/licenses/>.

class PropertiesHandler < Riddl::Utils::Properties::HandlerBase
  def sync
    case @property
      when 'handlerwrapper'
        @data.unserialize_handlerwrapper!
        @data.notify('properties/handlerwrapper/change', :instance => @data.instance)
      when 'description'
        nots = @data.unserialize_description!
        @data.notify('properties/description/change', :instance => @data.instance)
        nots.uniq.each do |noti|
          @data.notify(*noti)
        end
      when 'endpoints'
        @data.unserialize_endpoints!
        @data.notify('properties/endpoints/change', :instance => @data.instance)
      when 'dataelements'
        @data.unserialize_dataelements!
        @data.notify('properties/dataelements/change', :instance => @data.instance)
      when 'positions'  
        @data.unserialize_positions!
        @data.notify('properties/position/change', :instance => @data.instance)
      when 'state'  
        @data.unserialize_state!
      else
        nil
    end
  end

  def create; sync; end
  def update; sync; end
  def delete; sync; end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
cpee-1.3.152 lib/cpee/handler_properties.rb
cpee-1.3.151 lib/cpee/handler_properties.rb
cpee-1.3.150 lib/cpee/handler_properties.rb
cpee-1.3.149 lib/cpee/handler_properties.rb
cpee-1.3.148 lib/cpee/handler_properties.rb
cpee-1.3.147 lib/cpee/handler_properties.rb
cpee-1.3.146 lib/cpee/handler_properties.rb
cpee-1.3.145 lib/cpee/handler_properties.rb
cpee-1.3.144 lib/cpee/handler_properties.rb
cpee-1.3.143 lib/cpee/handler_properties.rb
cpee-1.3.142 lib/cpee/handler_properties.rb
cpee-1.3.141 lib/cpee/handler_properties.rb
cpee-1.3.140 lib/cpee/handler_properties.rb
cpee-1.3.139 lib/cpee/handler_properties.rb
cpee-1.3.138 lib/cpee/handler_properties.rb
cpee-1.3.137 lib/cpee/handler_properties.rb
cpee-1.3.136 lib/cpee/handler_properties.rb
cpee-1.3.134 lib/cpee/handler_properties.rb
cpee-1.3.133 lib/cpee/handler_properties.rb
cpee-1.3.132 lib/cpee/handler_properties.rb