Sha256: bc34a89cf5afaa1b7a64f767da1804f3b2b08fa5e2e219ac074e6885a2a14d27

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

module RailsConnector

class BasicWidget
  include AttributeContent

  def self.type_computer
    @_type_computer ||= TypeComputer.new(RailsConnector::BasicWidget, ::Widget)
  end

  def self.reset_type_computer!
    @_type_computer = nil
  end

  attr_accessor :id, :obj

  alias_method :initialize, :update_data

  delegate :widget_from_pool, to: :obj

  def obj_class
    data_from_cms.value_of('_obj_class')
  end

  def ==(other)
    other.respond_to?(:obj) && obj == other.obj && other.respond_to?(:id) && id == other.id
  end

  def eql?(other)
    self == other
  end

  def hash
    (id + obj.id).hash
  end
end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
infopark_cloud_connector-7.0.2 lib/rails_connector/basic_widget.rb
infopark_cloud_connector-7.0.1 lib/rails_connector/basic_widget.rb
infopark_cloud_connector-7.0.0 lib/rails_connector/basic_widget.rb