Sha256: 91adefc7666be2118f27ffbeb6b72628a1eeb7e6270269ba7276d4396fadac71
Contents?: true
Size: 967 Bytes
Versions: 18
Compression:
Stored size: 967 Bytes
Contents
module KirguduBase module DynamicPages class EntryProperty < ::KirguduBase::DynamicPages::Property mergeable_attributes :inplace_edit, :output_control, :target validates_inclusion_of :output_control, in: ::KirguduBase::DynamicPages::Enums::SUPPORTED_ENTRY_CONTROLS, allow_nil: true validates_inclusion_of :target, in: ::KirguduBase::DynamicPages::Enums::SUPPORTED_LINK_TARGETS, allow_nil: true validates_presence_of :target, if: :is_control_with_target? validates_inclusion_of :inplace_edit, in: [:true, :false], allow_nil: true def initialize(options = {}) self.inplace_edit = nil self.output_control = nil self.target = nil super(options) end attr_accessor :inplace_edit attr_accessor :output_control attr_accessor :target # used when control is a :link def is_control_with_target? ::KirguduBase::DynamicPages::Enums::ENTRY_CONTROLS_WITH_TARGET.include?(self.output_control) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems