abstract class PlaceOS::Model::SubModel
- PlaceOS::Model::SubModel
- ActiveModel::Model
- Reference
- Object
Overview
Validation for embedded objects in Engine models
Included Modules
- ActiveModel::Validation
Direct Known Subclasses
- PlaceOS::Model::Trigger::Actions
- PlaceOS::Model::Trigger::Actions::Email
- PlaceOS::Model::Trigger::Actions::Function
- PlaceOS::Model::Trigger::Conditions
- PlaceOS::Model::Trigger::Conditions::Comparison
- PlaceOS::Model::Trigger::Conditions::TimeDependent
Defined in:
placeos-models/base/model.crConstant Summary
-
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
-
.new(pull : JSON::PullParser)
Validation for embedded objects in Engine models
-
.new(rs : DB::ResultSet)
Validation for embedded objects in Engine models
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
-
.from_rs(rs : DB::ResultSet)
Validation for embedded objects in Engine models
Instance Method Summary
-
#apply_defaults
Generate code to apply default values
-
#assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Assign to mulitple 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
Constructor Detail
Validation for embedded objects in Engine models
Class Method Detail
Instance Method Detail
Assign to mulitple attributes via HTTP::Params
.
Assign to multiple attributes from a model object