Sha256: af38f5e34a7e9d0709f9cb0748e875ef793537209647b7320a232e3584348387
Contents?: true
Size: 793 Bytes
Versions: 10
Compression:
Stored size: 793 Bytes
Contents
# frozen_string_literal: true require 'active_model' module Quby module Compiler module Entities class Item include ActiveModel::Validations include ActiveSupport::Callbacks define_callbacks :after_dsl_enhance attr_accessor :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
10 entries across 10 versions & 1 rubygems