Module: StringToInternalIdentifier
- Included in:
- String
- Defined in:
- lib/erp_base_erp_svcs/extensions/core/string.rb
Instance Method Summary collapse
Instance Method Details
#to_iid ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/erp_base_erp_svcs/extensions/core/string.rb', line 10 def to_iid iid = self.squish.gsub(' ', '_').tr('^A-Za-z0-9_', '').downcase #remove trailing _ if iid[-1] == '_' iid.chop! end iid end |