Class: Lutaml::Qea::Models::EaStatusType

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/lutaml/qea/models/ea_status_type.rb

Overview

Represents a status type definition from t_statustypes table

This table provides reference data for status values that can be assigned to UML elements (Approved, Implemented, Mandatory, etc.).

Examples:

status_type = EaStatusType.new
status_type.status #=> "Approved"
status_type.description #=> "Item is approved"

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

from_db_row, #primary_key

Class Method Details

.primary_key_columnObject

Primary key is Status (text)



24
25
26
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 24

def self.primary_key_column
  "Status"
end

.table_nameObject



19
20
21
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 19

def self.table_name
  "t_statustypes"
end

Instance Method Details

#approved?Boolean

Check if this is the Approved status

Returns:

  • (Boolean)


36
37
38
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 36

def approved?
  status == "Approved"
end

#implemented?Boolean

Check if this is the Implemented status

Returns:

  • (Boolean)


42
43
44
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 42

def implemented?
  status == "Implemented"
end

#mandatory?Boolean

Check if this is the Mandatory status

Returns:

  • (Boolean)


48
49
50
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 48

def mandatory?
  status == "Mandatory"
end

#nameString

Friendly name for status

Returns:

  • (String)


30
31
32
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 30

def name
  status
end

#proposed?Boolean

Check if this is the Proposed status

Returns:

  • (Boolean)


54
55
56
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 54

def proposed?
  status == "Proposed"
end

#validated?Boolean

Check if this is the Validated status

Returns:

  • (Boolean)


60
61
62
# File 'lib/lutaml/qea/models/ea_status_type.rb', line 60

def validated?
  status == "Validated"
end