Created
April 17, 2022 01:41
-
-
Save prahal/871af282b59589812eb706ee1e327a16 to your computer and use it in GitHub Desktop.
cannot convert hash to keyword arguments in super - wrong number of arguments error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base | |
attr_reader :gitolite_config, :repository, :context, :options | |
def initialize(gitolite_config, repository, context, **options) | |
@gitolite_config = gitolite_config | |
@repository = repository | |
@context = context | |
@options = options.dup | |
@old_perms = {} | |
end | |
class << self | |
def call(gitolite_config, repository, context, **options) | |
new(gitolite_config, repository, context, **options).call | |
end | |
end | |
def call | |
raise NotImplementedError | |
end | |
end | |
class AddRepository < Base | |
def call | |
puts 'test' | |
end | |
def initialize(*args) | |
super | |
@force = options.delete(:force) { false } | |
@old_perms = options.delete(:old_perms) { {} } | |
end | |
end | |
AddRepository.call "gitolite_config", "repository", "context", **{:a => 'value'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment