use blocks to improve codeclimate score
Merge pull request #453 from neo4jrb/refactor_v2

use blocks to improve codeclimate score