Rename @f to @function_signature for clarity
This commit is contained in:
parent
d0a43507ae
commit
b85cb99011
@ -11,7 +11,7 @@ class SqlTemplateRenderer
|
|||||||
GEOCODER_CLIENT_SCHEMA = 'cdb_geocoder_client'
|
GEOCODER_CLIENT_SCHEMA = 'cdb_geocoder_client'
|
||||||
|
|
||||||
def initialize(template_file, function_signature)
|
def initialize(template_file, function_signature)
|
||||||
@f = function_signature
|
@function_signature = function_signature
|
||||||
@template = File.read(template_file)
|
@template = File.read(template_file)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -20,19 +20,19 @@ class SqlTemplateRenderer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def name
|
def name
|
||||||
@f['name']
|
@function_signature['name']
|
||||||
end
|
end
|
||||||
|
|
||||||
def return_type
|
def return_type
|
||||||
@f['return_type']
|
@function_signature['return_type']
|
||||||
end
|
end
|
||||||
|
|
||||||
def params
|
def params
|
||||||
@f['params'].map { |p| p['name'] }.join(', ')
|
@function_signature['params'].map { |p| p['name'] }.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def params_with_type
|
def params_with_type
|
||||||
@f['params'].map { |p| "#{p['name']} #{p['type']}"}.join(', ')
|
@function_signature['params'].map { |p| "#{p['name']} #{p['type']}"}.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user