Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rbplusplus.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#as_variableObject

Functionize attempts to rename a string in a cpp function friendly way.

vector<float>::x => vector_float__x



67
68
69
# File 'lib/rbplusplus.rb', line 67

def as_variable
  gsub("::","_").gsub(/[ ,<>]/, "_").gsub("*", "Ptr")
end