provider/core.rb
# Generates the documentation for the client side function to be
# included in the module. Call this function immediately before the function
# definition and the code generator will use data from api.yaml to build the
# documentation comment block.
#
# rubocop: Method returns a big array. Easier to read a single block
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/MethodLength
Generates the documentation for the client side function to be
included in the module. Call this function immediately before the function
definition and the code generator will use data from api.yaml to build the
documentation comment block.

Method returns a big array. Easier to read a single block
rubocop:disable Metrics/AbcSize
rubocop:disable Metrics/MethodLength
Generates the documentation for the client side function to be included in the module . Call this function immediately before the function definition and the code generator will use data from api . yaml to build the documentation comment block . Method returns a big array . Easier to read a single block rubocop : disable Metrics / AbcSize rubocop : disable Metrics / MethodLength
def emit_function_doc(function)
      [
        function.description.strip,
        '',
        'Arguments:',
        indent(function.arguments.map do |arg|
                 [
                   "- #{arg.name}: #{arg.type.split('::').last.downcase}",
                   indent(arg.description.strip.split("\n"), 2)
                 ]
               end, 2),
        (
          unless function.examples.nil?
            [
              '',
              'Examples:',
              indent(function.examples.map { |eg| "- #{eg}" }, 2)
            ]
          end
        ),
        (
          unless function.notes.nil?
            [
              '',
              function.notes.strip
            ]
          end
        )
      ].compact.flatten.join("\n").split("\n").map { |l| "# #{l}".strip }
    end
def emit_function_doc ( function ) [ function . description . strip , '' , 'Arguments:' , indent ( function . arguments . map do | arg | [ "- #{arg.name}: #{arg.type.split('::').last.downcase}" , indent ( arg . description . strip . split ( "\n" ) , 2 ) ] end , 2 ) , ( unless function . examples . nil? [ '' , 'Examples:' , indent ( function . examples . map { | eg | "- #{eg}" } , 2 ) ] end ) , ( unless function . notes . nil? [ '' , function . notes . strip ] end ) ] . compact . flatten . join ( "\n" ) . split ( "\n" ) . map { | l | "# #{l}" . strip } end
Generates the documentation for the client side function to be
included in the module.
Generates the documentation for the client side function to be included in the module .
function
<not_specific>