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

Implement parser #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Implement parser #18

wants to merge 1 commit into from

Conversation

nlegg
Copy link

@nlegg nlegg commented Oct 19, 2015

@@ -1,3 +1,8 @@
def word_in_string?(word, string)
# implement with your code here
split_string = string.split(%r{\s|_|-})
if split_string.include?(word)
Copy link
Member

Choose a reason for hiding this comment

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

👍 FYI: You can make this a oneliner. Ternary operators aren't frowned upon in Ruby.

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