Class: Lutaml::Xmi::LiquidDrops::CardinalityDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::Xmi::LiquidDrops::CardinalityDrop
- Defined in:
- lib/lutaml/xmi/liquid_drops/cardinality_drop.rb
Instance Method Summary collapse
-
#initialize(model) ⇒ CardinalityDrop
constructor
rubocop:disable Lint/MissingSuper.
- #max ⇒ Object
- #min ⇒ Object
Constructor Details
#initialize(model) ⇒ CardinalityDrop
rubocop:disable Lint/MissingSuper
7 8 9 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 7 def initialize(model) # rubocop:disable Lint/MissingSuper @model = model end |
Instance Method Details
#max ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 22 def max return nil unless @model case @model when ::Lutaml::Uml::Cardinality @model.max else @model.upper_value&.value end end |
#min ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 11 def min return nil unless @model case @model when ::Lutaml::Uml::Cardinality @model.min else @model.lower_value&.value end end |