Sha256: 8bc2454d0a0db9ffd1b5eeb2eae61077c3e47eb1472f0c13ba0bd8e553ff79f4
Contents?: true
Size: 699 Bytes
Versions: 5
Compression:
Stored size: 699 Bytes
Contents
# frozen_string_literal: true module Esquema class VirtualColumn # rubocop:disable Style/Documentation def initialize(property_name, options = {}) @property_name = property_name @options = options end def name @property_name.to_s end def class_name @property_name.to_s.classify end def type @options[:type] end def item_type @options.dig(:items, :type) end def default @options[:default] end def title @options[:title] end def description @options[:description] end def columns [] end def collection? @options[:type] == :array end end end
Version data entries
5 entries across 5 versions & 3 rubygems