module KirguduBase module DynamicPages class Entry < ::KirguduBase::DynamicPages::PageElement mergeable_attributes :http_method, :is_ajax, :properties, :parent fixable_attributes :parent, :properties validates_inclusion_of :http_method, in: ::KirguduBase::DynamicPages::Enums::SUPPORTED_HTTP_METHODS, allow_nil: true validates_inclusion_of :is_ajax, in: [:true, :false], allow_nil: true def initialize(options = {}) self.is_ajax = nil self.properties = nil self.parent = nil self.http_method = nil super(options) end attr_accessor :http_method attr_accessor :is_ajax attr_accessor :properties attr_accessor :parent def merge(source_element) #self.properties do |element| # element.merge(source_element.properties) #end if self.properties && source_element.properties self.parent ||= source_entry.parent self.http_method end end end end