Class: GemCP::Tools::GetVersion

Inherits:
Base
  • Object
show all
Defined in:
lib/gemcp/tools/get_version.rb

Overview

Fetch metadata for a specific gem version and optional platform.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from GemCP::Tools::Base

Instance Method Details

#call(name:, version:, platform: nil) ⇒ Hash

Returns MCP response.

Parameters:

  • name (String)

    gem name

  • version (String)

    version number

  • platform (String, nil) (defaults to: nil)

    platform filter

Returns:

  • (Hash)

    MCP response



20
21
22
# File 'lib/gemcp/tools/get_version.rb', line 20

def call(name:, version:, platform: nil)
  render(with_errors { client.version(name, version, platform: platform) })
end