From 4d431aa57d0667264ba21457786adccadc79b671 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 14 Jun 2016 14:49:56 +0200 Subject: [PATCH] Ruby: ruby way of using parenthesis for methods. --- .rubocop.yml | 5 ----- lib/nebula.rb | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7378663..e1913b5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -33,11 +33,6 @@ Style/GlobalVars: - lib/api.rb - lib/nebula.rb -# Omit the parentheses in defs when the method doesn't accept any arguments -# (easy to read) -Style/DefWithParentheses: - Enabled: false - # Extra empty line detected at class body end # (easy to read) Style/EmptyLinesAroundClassBody: diff --git a/lib/nebula.rb b/lib/nebula.rb index 6419da8..a871d9c 100644 --- a/lib/nebula.rb +++ b/lib/nebula.rb @@ -44,7 +44,7 @@ module Now @ctx = @user_ctx end - def switch_server() + def switch_server admin_user = @config['opennebula']['admin_user'] admin_password = @config['opennebula']['admin_password'] logger.debug "Authentication to #{admin_user}" @@ -54,7 +54,7 @@ module Now @ctx = @server_ctx end - def initialize() + def initialize @logger = $logger logger.info "Starting Network Orchestrator Wrapper (NOW #{VERSION})" @config = {} @@ -70,7 +70,7 @@ module Now @url = @config['opennebula']['endpoint'] end - def list_networks() + def list_networks vn_pool = OpenNebula::VirtualNetworkPool.new(@ctx, -1) check(vn_pool.info) -- 1.8.2.3