Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Concept for potentially better interface #1

Description

@trans

Where as currently we have a partial method/constant interface, e.g. XDG::Config.home or XDG.config.home. It is possible to use a complete constant and make it act both like an string/array and a pathname.

XDG::CONFIG::HOME  => "~/.config"
XDG::CONFIG::DIRS  => ["/etc/xdg", "/etc"]

But still have a file based set of methods too:

XDG::CONFIG::DIRS.find(pattern){ |f| .... }
XDG::CONFIG::DIRS.glob(pattern){ |f| .... }

And to include both home and dirs:

XDG::CONFIG.find(pattern){ |f| .... }
XDG::CONFIG.glob(pattern){ |f| .... }

(Might use a different name for #find since that's used by Enumerable already, but not sure what that might be.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions