Skip to content

Commit

Permalink
[patch:lib] Change 'ends_with...?' to 'end_with...?' (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
eonu authored Apr 14, 2019
1 parent cdf23ec commit e0d3921
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/arx/query/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def to_s
# @return [self]
def add_connective(connective)
if search_query?
@query << "+#{CONNECTIVES[connective]}" unless ends_with_connective?
@query << "+#{CONNECTIVES[connective]}" unless end_with_connective?
end
self
end
Expand All @@ -199,7 +199,7 @@ def add_connective(connective)
# @param subquery [String] The subquery to add.
def add_subquery(subquery)
if search_query?
add_connective :and unless ends_with_connective?
add_connective :and unless end_with_connective?
@query << "+#{subquery}"
else
@query << "&#{PARAMS[:search_query]}=#{subquery}"
Expand All @@ -218,7 +218,7 @@ def search_query?
#
# @see CONNECTIVES
# @return [Boolean]
def ends_with_connective?
def end_with_connective?
CONNECTIVES.values.any? &@query.method(:end_with?)
end

Expand Down

0 comments on commit e0d3921

Please sign in to comment.