Class: Preferable::Schema

Inherits:
Hash
  • Object
show all
Defined in:
lib/preferable/schema.rb

Instance Method Summary collapse

Instance Method Details

#field(name, type, options = {}) ⇒ Object



5
6
7
8
# File 'lib/preferable/schema.rb', line 5

def field(name, type, options = {})
  item = Preferable::Field.new(name, type, options)
  self[item.name] = item
end