Skip to content

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Apr 1, 2022

Having only nodes inside node.rb makes it easier to search&replace inside the file or apply scripts on it.

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
parts = keywords.map { |(key, value)| KeywordFormatter.new(key, value) }
parts << KeywordRestFormatter.new(keyword_rest) if keyword_rest
parts = keywords.map { |(key, value)| HshPtnKeywordFormatter.new(key, value) }
parts << HshPtnKeywordRestFormatter.new(keyword_rest) if keyword_rest
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to avoid conflict with the ParamsKeywordRestFormatter

def format(q)
parts = keywords.map { |(key, value)| KeywordFormatter.new(key, value) }
parts << KeywordRestFormatter.new(keyword_rest) if keyword_rest
parts = keywords.map { |(key, value)| HshPtnKeywordFormatter.new(key, value) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to avoid conflict with the ParamsKeywordFormatter

@kddnewton
Copy link
Member

I'm reluctant to move all of this into a separate file when it's being directly invoked by the format methods.

I'd love to move all of the formatting logic into its own file though, not just the formatting classes.

@kddnewton kddnewton force-pushed the main branch 6 times, most recently from 496540d to cdf6a9e Compare April 13, 2022 01:06
@Morriar Morriar closed this Apr 13, 2022
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