Sha256: 14f6ef546554b057cf171ea7505c58a7b956ca4683240a48f01c891d5846df0f
Contents?: true
Size: 911 Bytes
Versions: 12
Compression:
Stored size: 911 Bytes
Contents
module Coprl module Presenters module DSL module Components class Chipset < EventBase include Mixins::Chips attr_reader :variant, :components VALID_VARIANTS = %i[choice filter input].freeze def initialize(chipset_variant = nil, **attribs_, &block) super(type: :chipset, **attribs_, &block) @variant = validate_variant(chipset_variant) @components = [] expand! end private def validate_variant(chipset_variant) return unless chipset_variant chipset_variant = chipset_variant.to_sym unless VALID_VARIANTS.include?(chipset_variant) raise Errors::ParameterValidation, "Invalid chipset variant specified: #{chipset_variant}" end chipset_variant end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems