Module: SDL
- Defined in:
- lib/sdl.rb,
lib/sdl/enum.rb,
lib/sdl/name.rb,
lib/sdl/field.rb,
lib/sdl/model.rb,
lib/sdl/types.rb,
lib/sdl/parser.rb,
lib/sdl/schema.rb,
lib/sdl/version.rb,
lib/sdl/attribute.rb,
lib/sdl/attachment.rb,
lib/sdl/association.rb
Defined Under Namespace
Classes: Association, Attachment, Attribute, CircularDependencyError, Enum, Error, Field, Model, Name, ParseError, Parser, Schema
Constant Summary collapse
- SCALAR_TYPES =
%i[ id string boolean integer float decimal date datetime text binary ]
- TYPES =
SCALAR_TYPES + %i[ enum belongs_to has_one has_many has_one_attached has_many_attached ]
- VERSION =
"0.0.0"
Class Method Summary collapse
-
.define(&block) ⇒ Schema
Defines a new schema.
-
.load_file(file) ⇒ Schema
Loads a schema from a file.
-
.parse(name, fields) ⇒ Model
Constructs a model from command-line arguments.
Class Method Details
.define(&block) ⇒ Schema
Defines a new schema. The block will be evaluated in the context of a Schema
28 29 30 |
# File 'lib/sdl.rb', line 28 def self.define(&block) Schema.new(&block) end |