Class: Opencdd::Relation
- Inherits:
-
Entity
- Object
- Entity
- Opencdd::Relation
- Defined in:
- lib/opencdd/relation.rb
Constant Summary collapse
- RELATION_TYPES =
{ "FUNCTION" => :function, "PREDICATION" => :predication, }.freeze
Instance Method Summary collapse
- #aggregation? ⇒ Boolean
- #association? ⇒ Boolean
- #composition? ⇒ Boolean
- #function? ⇒ Boolean
- #generalization? ⇒ Boolean
- #predication? ⇒ Boolean
- #relation_type_symbol ⇒ Object
- #specialization? ⇒ Boolean
Instance Method Details
#aggregation? ⇒ Boolean
56 57 58 59 |
# File 'lib/opencdd/relation.rb', line 56 def aggregation? rt = relation_type rt ? rt.aggregation? : false end |
#association? ⇒ Boolean
51 52 53 54 |
# File 'lib/opencdd/relation.rb', line 51 def association? rt = relation_type rt ? rt.association? : false end |
#composition? ⇒ Boolean
61 62 63 64 |
# File 'lib/opencdd/relation.rb', line 61 def composition? rt = relation_type rt ? rt.composition? : false end |
#function? ⇒ Boolean
46 47 48 49 |
# File 'lib/opencdd/relation.rb', line 46 def function? rt = relation_type rt ? rt.function? : false end |
#generalization? ⇒ Boolean
66 67 68 69 |
# File 'lib/opencdd/relation.rb', line 66 def generalization? rt = relation_type rt ? rt.generalization? : false end |
#predication? ⇒ Boolean
41 42 43 44 |
# File 'lib/opencdd/relation.rb', line 41 def predication? rt = relation_type rt ? rt.predication? : false end |
#relation_type_symbol ⇒ Object
36 37 38 39 |
# File 'lib/opencdd/relation.rb', line 36 def relation_type_symbol value = relation_type value ? value.to_sym : nil end |
#specialization? ⇒ Boolean
71 72 73 74 |
# File 'lib/opencdd/relation.rb', line 71 def specialization? rt = relation_type rt ? rt.specialization? : false end |