Skip to content

Commit

Permalink
Fix rubocop offenses (they are causing dependabot PRs to fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
sensei100 committed Mar 27, 2023
1 parent adea8dc commit 30d104e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/cob_index/macros/wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# frozen_string_literal: true

module CobIndex::Macros::Wrapper

START_MATCHER = "matchbeginswith"
END_MATCHER = "matchendswith"

Expand All @@ -13,16 +12,16 @@ def wrap_begin_end(*args)
end


def first_word_matcher(string="", start_matcher = START_MATCHER)
def first_word_matcher(string = "", start_matcher = START_MATCHER)
start_matcher + string.to_s.split.first.to_s
end

def last_word_matcher(string="", end_matcher = END_MATCHER)
def last_word_matcher(string = "", end_matcher = END_MATCHER)
end_matcher + string.to_s.split.last.to_s
end


def add_first_word_matcher(string="", start_matcher = START_MATCHER)
def add_first_word_matcher(string = "", start_matcher = START_MATCHER)
starts ||= START_MATCHER
first_word = first_word_matcher(string, starts)

Expand All @@ -33,7 +32,7 @@ def add_first_word_matcher(string="", start_matcher = START_MATCHER)
end
end

def add_last_word_matcher(string="", end_matcher = END_MATCHER)
def add_last_word_matcher(string = "", end_matcher = END_MATCHER)
ends ||= END_MATCHER
last_word = last_word_matcher(string, ends)

Expand Down

0 comments on commit 30d104e

Please sign in to comment.