Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Parameters with default value #75

Open
denisdefreyne opened this issue Aug 26, 2018 · 2 comments
Open

Feature: Parameters with default value #75

denisdefreyne opened this issue Aug 26, 2018 · 2 comments
Labels

Comments

@denisdefreyne
Copy link
Owner

Idea: allow parameters to be defined with a default value. For example:

param :host
param :port, transform: method(:Integer), default: 3000

For simplicity, allow parameters with a default value to only appear at the end. The following would therefore not be possible:

param :foo, default: 'xxx'
param :bar
param :foo
param :bar, default: 'xxx'
param :qux
param :abc, default: 'yyy'

I image that this restriction will be fine, because the CLI will become complicated to use otherwise anyway.

@denisdefreyne denisdefreyne changed the title Feature: parameters with default value Feature: Parameters with default value Aug 26, 2018
@andkirby
Copy link

andkirby commented Aug 31, 2018

Guys, has this feature been released?...
I'm getting an error on set default:

/.../ruby-2.5.1/lib/.../cri-2.15.0/lib/cri/command_dsl.rb:173:in 
    `param': unknown keyword: default (ArgumentError)

UPD...
Yeah, I guess not, here are no commits yet.
It would be great to have this feature. It will allow to make a parameter make as an optional one by setting empty value like nil or ''.

@denisdefreyne
Copy link
Owner Author

@andkirby It’s not implemented yet! This GitHub issue serves as a to-do item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants