Ruby: ruby way of using parenthesis for methods.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 14 Jun 2016 12:49:56 +0000 (14:49 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 14 Jun 2016 12:49:56 +0000 (14:49 +0200)
.rubocop.yml
lib/nebula.rb

index 7378663..e1913b5 100644 (file)
@@ -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:
index 6419da8..a871d9c 100644 (file)
@@ -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)