Sha256: ad1159fe2c05633564f8115629bcf7c2869a758dcc575d356642f97250b26a44

Contents?: true

Size: 247 Bytes

Versions: 2

Compression:

Stored size: 247 Bytes

Contents

require_relative 'string'

class Typero::TextType < Typero::StringType
  opts :min, 'Minimun string length'
  opts :max, 'Maximun string length'

  def db_field
    opts = {}
    opts[:null]  = false if @opts[:required]
    [:text, opts]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typero-0.8.1 ./lib/typero/type/types/text.rb
typero-0.8.0 ./lib/typero/type/types/text.rb