class

PlaceOS::Model::SubModel

Inherits ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object

Validation for embedded objects in Engine models

Constants

AM_PARENT_TYPE = {:type => PlaceOS::Model::SubModel} of Nil => Nil

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)

Validation for embedded objects in Engine models

Source
new(pull : JSON::PullParser)

Validation for embedded objects in Engine models

Source
new(rs : DB::ResultSet)

Validation for embedded objects in Engine models

Source

Class methods

attributes

Returns all attribute keys.

from_rs(rs : DB::ResultSet)

Validation for embedded objects in Engine models

Source

Instance methods

apply_defaults

Generate code to apply default values

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::SubModel)

Assign to multiple attributes from a model object

assign_attributes

Assign to multiple attributes.

attributes

Returns a Hash of all attribute values

attributes_tuple

Returns a NamedTuple of all attribute values.

persistent_attributes

Returns a Hash of all attributes that can be persisted.

to_reql

RethinkDB library serializes through JSON::Any

Source