Sha256: 614c311861a6376b30eb87a45febdca26f21f9268f2e57338cb9ce2f1fff1fb3
Contents?: true
Size: 799 Bytes
Versions: 5
Compression:
Stored size: 799 Bytes
Contents
# frozen_string_literal: true require 'active_model' module Quby module Questionnaires module Entities class Item include ActiveModel::Validations include ActiveSupport::Callbacks define_callbacks :after_dsl_enhance attr_writer :presentation attr_accessor :switch_cycle # Raw content may contain a raw HTML replacement for this item attr_accessor :raw_content def initialize(options = {}) @raw_content = options[:raw_content] @switch_cycle = options[:switch_cycle] || false end def presentation @presentation || "vertical" end def as_json(options = {}) { class: self.class.to_s } end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems