Sha256: dddecae2e1b041bf2b027dbf5543608f2b8189d9781cc3dd7334b68a3874993a

Contents?: true

Size: 973 Bytes

Versions: 32

Compression:

Stored size: 973 Bytes

Contents

require 'fiona7/builder/obj_updater'
require 'fiona7/builder/widget_building'

module Fiona7
  module Builder
    class WidgetUpdater < ObjUpdater
      include WidgetBuilding
      def initialize(owner_obj, widget_id, values, path_map)
        @owner_obj, @widget_id, @values, @widget_path_map = owner_obj, widget_id, values.symbolize_keys, path_map
      end

      protected
      def update?
        true
      end

      def prepare_object
        @path        = self.generate_widget_path
        @obj         = WriteObj.find(@values.delete(:_id))
        @name        = @widget_id

        if obj_class = @values.delete(:_obj_class)
          @obj_class      = obj_class
          @real_obj_class = Fiona7::ObjClassNameMangler.new(@obj_class).mangle
        else
          @real_obj_class = @obj.obj_class
          @obj_class      = Fiona7::ObjClassNameDemangler.new(@real_obj_class).demangle
        end

        ensure_obj_class_exists
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/builder/widget_updater.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/builder/widget_updater.rb