Sha256: 2421bd082b88c292d9aa1a823ca4e627bf352b88e571f0a9d215fe23c2bfcce4
Contents?: true
Size: 392 Bytes
Versions: 1
Compression:
Stored size: 392 Bytes
Contents
class Formation::Type def self.create(field, type) klass = case type.to_sym when :checkbox Formation::Types::Checkbox when :password Formation::Types::Password when :text Formation::Types::Text when :textarea Formation::Types::TextArea else raise "Invalid or unsupported field type: #{type}" end klass.new(field) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
formation-0.0.1 | lib/formation/type.rb |