From 97acd1b0b307ba23bd9e80d8e42b93d8d26d729e Mon Sep 17 00:00:00 2001 From: Ian Kronquist Date: Fri, 18 Sep 2015 16:03:52 -0700 Subject: [PATCH] (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`. --- .../strings/yard/handlers/puppet_4x_function_handler.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/puppet_x/puppetlabs/strings/yard/handlers/puppet_4x_function_handler.rb b/lib/puppet_x/puppetlabs/strings/yard/handlers/puppet_4x_function_handler.rb index 46967fc..298c8da 100644 --- a/lib/puppet_x/puppetlabs/strings/yard/handlers/puppet_4x_function_handler.rb +++ b/lib/puppet_x/puppetlabs/strings/yard/handlers/puppet_4x_function_handler.rb @@ -30,8 +30,9 @@ class Puppet4xFunctionHandler < YARD::Handlers::Ruby::Base return [] if command.children.length < 2 or command.children[1].children.length < 2 type_specifier = command.children[1] # the parameter signature is the first child of the specifier and an - # identifier. Convert it to a string. - param_signature = type_specifier.children[0].source + # identifier. Jump to the content inside the quotes and convert it to a + # string. + param_signature = type_specifier.children[0].jump(:tstring_content).source # The parameter name is the second child of the specifier and a symbol. # convert it to a string. param_name_ident = type_specifier.jump :ident