Class: Lutaml::XMI::CardinalityDrop
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Lutaml::XMI::CardinalityDrop
- Includes:
- Parsers::XMIBase
- 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
Methods included from Parsers::XMIBase
#get_guidance, included, #set_xmi_model
Constructor Details
#initialize(model) ⇒ CardinalityDrop
rubocop:disable Lint/MissingSuper
8 9 10 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 8 def initialize(model) # rubocop:disable Lint/MissingSuper @model = model end |
Instance Method Details
#max ⇒ Object
18 19 20 21 22 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 18 def max return @model[:max] if @model.is_a?(Hash) @model.upper_value&.value end |
#min ⇒ Object
12 13 14 15 16 |
# File 'lib/lutaml/xmi/liquid_drops/cardinality_drop.rb', line 12 def min return @model[:min] if @model.is_a?(Hash) @model.lower_value&.value end |