(PDOC-57) Get the content of the string

We used to extract the string from the source code. We should have extracted
the content of the string. This is the difference between `"String"` and
`String`.
This commit is contained in:
Ian Kronquist 2015-09-18 16:03:52 -07:00
parent 3151e4e1b1
commit 97acd1b0b3
1 changed files with 3 additions and 2 deletions

View File

@ -30,8 +30,9 @@ class Puppet4xFunctionHandler < YARD::Handlers::Ruby::Base
return [] if command.children.length < 2 or command.children[1].children.length < 2 return [] if command.children.length < 2 or command.children[1].children.length < 2
type_specifier = command.children[1] type_specifier = command.children[1]
# the parameter signature is the first child of the specifier and an # the parameter signature is the first child of the specifier and an
# identifier. Convert it to a string. # identifier. Jump to the content inside the quotes and convert it to a
param_signature = type_specifier.children[0].source # string.
param_signature = type_specifier.children[0].jump(:tstring_content).source
# The parameter name is the second child of the specifier and a symbol. # The parameter name is the second child of the specifier and a symbol.
# convert it to a string. # convert it to a string.
param_name_ident = type_specifier.jump :ident param_name_ident = type_specifier.jump :ident