Method: SwiftTools::Csharp2Swift#convert_property

Defined in:
lib/swift_tools/csharp_2_swift.rb

#convert_property(content) ⇒ Object



191
192
193
194
195
196
197
198
# File 'lib/swift_tools/csharp_2_swift.rb', line 191

def convert_property(content)
  content.gsub!(/(^ *)(?:public|private|internal) +(?!class)([A-Za-z0-9_\[\]<>]+) +(\w+)(?: *\{)/) { |m|
    v = $3
    nv = v.lower_camelcase
    @renamed_vars[v] = nv
    $1 + 'var ' + nv + ': ' + $2 + ' {'
  }
end