Skip to content

Conversation

vburzynski
Copy link
Contributor

NOTE — this is dependent on the refactor-internal-module branch #1772

The StrategySyntaxMethodRegistrar doesn't need to be instantiated (and doesn't need to be a class) to perform the behavior it implements. This refactors it into a more functional module.

Comment on lines +4 to 8
def self.define_strategy_methods(strategy_name)
define_singular_strategy_method(strategy_name)
define_list_strategy_method(strategy_name)
define_pair_strategy_method(strategy_name)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, I think I prefer the object oriented approach given how how strategy_name is passed around. I'd consider defining the define_strategy_methods class method as new(strategy_name).define_strategy_methods

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants