Module: Canvas::Constants

Defined in:
lib/canvas/constants.rb

Constant Summary collapse

COLOR_PALETTE_VALUES =
%w[
  primary
  secondary
  body-bg
  body-color
].freeze
PRIMITIVE_TYPES =
%w[
  boolean
  color
  image
  link
  number
  page
  post
  product
  radio
  range
  select
  string
  text
  variant
  package
  date
  experience_date
  experience_slot
  enquiry_form
].freeze
TYPES_WITH_PRIMITIVE_VALUE =

These are types where the value is stored as a primitive type, e.g. string, integer. As opposed to values such as product IDs, color hashes, etc. This constant is currently used to determine whether it is safe to preserve a value when a variable changes type.

%w[
  boolean
  number
  radio
  range
  select
  string
  text
]