Class: Lutaml::Qea::Models::EaConstraintType
- Inherits:
-
BaseModel
- Object
- Model::Serializable
- BaseModel
- Lutaml::Qea::Models::EaConstraintType
- Defined in:
- lib/lutaml/qea/models/ea_constraint_type.rb
Overview
Represents a constraint type definition from t_constrainttypes table
This table provides reference data for constraint types used in OCL constraints. These are NOT instances of constraints, but the type definitions themselves (Invariant, Pre-condition, Post-condition, Process).
Class Method Summary collapse
-
.primary_key_column ⇒ Object
Primary key is Constraint (text).
- .table_name ⇒ Object
Instance Method Summary collapse
-
#invariant? ⇒ Boolean
Check if this is an invariant type.
-
#name ⇒ String
Friendly name for constraint type.
-
#postcondition? ⇒ Boolean
Check if this is a post-condition type.
-
#precondition? ⇒ Boolean
Check if this is a pre-condition type.
-
#process? ⇒ Boolean
Check if this is a process type.
Methods inherited from BaseModel
Class Method Details
.primary_key_column ⇒ Object
Primary key is Constraint (text)
27 28 29 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 27 def self.primary_key_column "Constraint" end |
.table_name ⇒ Object
22 23 24 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 22 def self.table_name "t_constrainttypes" end |
Instance Method Details
#invariant? ⇒ Boolean
Check if this is an invariant type
39 40 41 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 39 def invariant? constraint == "Invariant" end |
#name ⇒ String
Friendly name for constraint type
33 34 35 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 33 def name constraint end |
#postcondition? ⇒ Boolean
Check if this is a post-condition type
51 52 53 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 51 def postcondition? constraint == "Post-condition" end |
#precondition? ⇒ Boolean
Check if this is a pre-condition type
45 46 47 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 45 def precondition? constraint == "Pre-condition" end |
#process? ⇒ Boolean
Check if this is a process type
57 58 59 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 57 def process? constraint == "Process" end |