Skip to content

It would be great if thor can provide the way to couple options. #585

Closed

Description

@itisnotdone

Hi,
This is not a bug report but a suggestion.

We sometimes need to define options that must to be tightly coupled each other to make things work.
For example, suppose there is an option :one, --one, and it needs another option :file, --file, to make things work as we expect. So in that circumstance, it would be great if thor can provide the way to couple those options as following manner.

method_option :one, :type => :boolean, :coupling => :file
method_option :file, :type => :string, :coupling => :one

# or

method_option :one, :type => :boolean, :coupling => [:file, :url] 
method_option :file, :type => :string, :coupling => :one
method_option :url, :type => :string, :coupling => :one

Activity

  1. locked and limited conversation to collaborators on May 12, 2023
  2. converted this issue into a discussion #830 on May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions