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)
29 30 31 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 29 def self.primary_key_column "Constraint" end |
.table_name ⇒ Object
24 25 26 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 24 def self.table_name "t_constrainttypes" end |
Instance Method Details
#invariant? ⇒ Boolean
Check if this is an invariant type
41 42 43 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 41 def invariant? constraint == "Invariant" end |
#name ⇒ String
Friendly name for constraint type
35 36 37 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 35 def name constraint end |
#postcondition? ⇒ Boolean
Check if this is a post-condition type
53 54 55 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 53 def postcondition? constraint == "Post-condition" end |
#precondition? ⇒ Boolean
Check if this is a pre-condition type
47 48 49 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 47 def precondition? constraint == "Pre-condition" end |
#process? ⇒ Boolean
Check if this is a process type
59 60 61 |
# File 'lib/lutaml/qea/models/ea_constraint_type.rb', line 59 def process? constraint == "Process" end |