Class Versionomy::Schema::Wrapper
In: lib/versionomy/schema/wrapper.rb
Parent: Object

Schemas are generally referenced through an object of this class.

Methods

==   ===   aliases   canonical_name   eql?   field_named   modules   names   new   root_field  

Public Class methods

Create a new schema wrapper object given a root field. This is a low-level method. Usually you should call Versionomy::Schema#create instead.

Public Instance methods

Returns true if this schema is compatible with the other schema. Two schemas are compatible if their root fields are the same— which means that the entire field tree is the same. They may, however, include different value modules. Note that this is different from the definition of eql?.

If the RHS is a schema, returns true if the schemas are equivalent. If the RHS is a value, returns true if the value uses this schema.

Returns a hash of field name aliases.

Return the canonical field name given a name, or nil if the name is not recognized.

Returns true if this schema is equivalent to the other schema. Two schemas are equivalent if their root fields are the same— which means that the entire field tree is the same— and they include the same value modules. Note that this is different from the definition of ==.

Return the field with the given name, or nil if the given name is not found in this schema. If include_aliases_ is set to true, this also supports lookup by alias.

Returns an array of modules that should be included in values that use this schema.

Returns an array of names present in this schema, in no particular order. Does not include aliases.

Returns the root (most significant) field in this schema.

[Validate]