Class: JHelper
- Inherits:
-
Object
- Object
- JHelper
- Defined in:
- lib/ontomde-java/java/javaHelper.rb
Class Method Summary collapse
- .to_firstUpper(name) ⇒ Object
- .to_NameProperty(name) ⇒ Object
-
.to_SingleName(name) ⇒ Object
remove the last caracter if āsā.
Class Method Details
.to_firstUpper(name) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/ontomde-java/java/javaHelper.rb', line 2 def JHelper.to_firstUpper(name) result = String.new(name) if !result.empty? result[0] = result[0, 1].upcase end return result end |
.to_NameProperty(name) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/ontomde-java/java/javaHelper.rb', line 9 def JHelper.to_NameProperty(name) result = String.new(name) if !result.empty? result[0] = result[0, 1].downcase end return result end |
.to_SingleName(name) ⇒ Object
remove the last caracter if āsā
17 18 19 20 21 22 23 |
# File 'lib/ontomde-java/java/javaHelper.rb', line 17 def JHelper.to_SingleName(name) result = String.new(name) if !result.empty? && result[result.size-1]==115 #'s' result = result[0, result.size - 1] end return result end |