Module: Muml_LiteralUnlimitedNatural
- Defined in:
- lib/ontomde-uml2/uml2.rb,
lib/ontomde-uml2/umlx.rb
Instance Method Summary collapse
- #to_s ⇒ Object
-
#umlx_equalOne? ⇒ Boolean
Returns true if value is equal one NOTE: * IBM RSM uses LiteralUnlimitedNatural * Magicdraw uses LiteralInteger and LiteralString.
-
#umlx_equalZero? ⇒ Boolean
Returns true if value is equal 0 (zero) NOTE: * IBM RSM uses LiteralUnlimitedNatural * Magicdraw uses LiteralInteger and LiteralString.
- #umlx_to_i ⇒ Object
Instance Method Details
#to_s ⇒ Object
166 167 168 169 |
# File 'lib/ontomde-uml2/uml2.rb', line 166 def to_s return uml_value.to_s if uml_value.to_s.length>0 super end |
#umlx_equalOne? ⇒ Boolean
Returns true if value is equal one NOTE:
-
IBM RSM uses LiteralUnlimitedNatural
-
Magicdraw uses LiteralInteger and LiteralString
147 148 149 |
# File 'lib/ontomde-uml2/umlx.rb', line 147 def umlx_equalOne? return uml_value_one.to_i==1 end |
#umlx_equalZero? ⇒ Boolean
Returns true if value is equal 0 (zero) NOTE:
-
IBM RSM uses LiteralUnlimitedNatural
-
Magicdraw uses LiteralInteger and LiteralString
155 156 157 |
# File 'lib/ontomde-uml2/umlx.rb', line 155 def umlx_equalZero? return uml_value_one.to_i==0 end |
#umlx_to_i ⇒ Object
170 171 172 173 |
# File 'lib/ontomde-uml2/uml2.rb', line 170 def umlx_to_i return 0 if to_s.nil? return to_s.to_i; end |