Skip to content

Commit

Permalink
Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
cheerfulstoic committed Oct 4, 2015
1 parent 11765ef commit 41b5684
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/neo4j-core/query.rb
Expand Up @@ -42,9 +42,7 @@ def remove_param(key)
end

def add_params(params)
params.map do |key, value|
add_param(key, value)
end
params.map { |key, value| add_param(key, value) }
end

private
Expand Down Expand Up @@ -216,9 +214,7 @@ def break
# Query.new.match('(q: Person {id: {id}})').params(id: 12)
#
def params(args)
copy.tap do |new_query|
new_query.instance_variable_get('@params').add_params(args)
end
copy.tap { |new_query| new_query.instance_variable_get('@params').add_params(args) }
end

def unwrapped
Expand Down Expand Up @@ -285,9 +281,7 @@ def each
# @return [Boolean] true if successful
# @raise [Neo4j::Server::CypherResponse::ResponseError] Raises errors from neo4j server
def exec
response

true
response && true
end

# Return the specified columns as an array.
Expand Down Expand Up @@ -315,8 +309,7 @@ def pluck(*columns)
end

def return_query(columns)
query = copy
query.remove_clause_class(ReturnClause)
(query = copy).remove_clause_class(ReturnClause)

query.return(*columns)
end
Expand Down

0 comments on commit 41b5684

Please sign in to comment.