Sha256: 773ba44a4b2254dd45b81cd31dce48379ccbf09400f3554e5f77b2e603eb4dc6
Contents?: true
Size: 581 Bytes
Versions: 14
Compression:
Stored size: 581 Bytes
Contents
module ActiveMocker module ActiveRecord # @api private class Field attr_accessor :name, :type, :options def initialize(name, type, options) @name = name @type = type @primary_key @options = options.first || {} end def primary_key @primary_key end def to_h {name: name, type: type, options: options} end alias_method :to_hash, :to_h def default options[:default] end def precision options[:precision] end def scale options[:scale] end end end end
Version data entries
14 entries across 14 versions & 1 rubygems