ruby

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ruby implements the Ruby import extractor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DepKey

func DepKey(raw string) string

DepKey returns the gem name as it appears in a Gemfile / lockfile.

"rails"            -> "rails"
"active_support"   -> "active_support"
"./local"          -> ""    (relative)
"./helpers"        -> ""    (relative)

Ruby's `require 'foo/bar'` form is common — `bar` is a sub-path inside the `foo` gem. depusage takes the first segment as the gem name.

func Extract

func Extract(body []byte, opts extract.Options) (extract.Result, error)

Extract runs the Ruby import pass over body.

func IsRelative

func IsRelative(raw string) bool

IsRelative reports whether the path looks like a project-local reference rather than a gem.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL