From c77944effd93493ad3c885f10700a6d137eeab39 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Thu, 15 May 2014 16:31:55 +0500 Subject: [PATCH] better method naming --- lib/gitlab/cli.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gitlab/cli.rb b/lib/gitlab/cli.rb index 8343e7a37..22b4054c1 100644 --- a/lib/gitlab/cli.rb +++ b/lib/gitlab/cli.rb @@ -20,9 +20,9 @@ def self.run(cmd, arguments=[]) begin data = arguments.any? ? Gitlab.send(cmd.to_sym, *arguments) : Gitlab.send(cmd.to_sym) if data.kind_of? Gitlab::ObjectifiedHash - puts single_table_output(data, cmd, arguments) + puts single_record_table(data, cmd, arguments) elsif data.kind_of? Array - puts multiple_table_output(data, cmd, arguments) + puts multiple_record_table(data, cmd, arguments) end rescue => e puts e.message @@ -35,7 +35,7 @@ def self.run(cmd, arguments=[]) end end - def self.multiple_table_output(data, cmd, args) + def self.multiple_record_table(data, cmd, args) return 'No data' if data.empty? arr = data.map(&:to_h) @@ -65,7 +65,7 @@ def self.multiple_table_output(data, cmd, args) end end - def self.single_table_output(data, cmd, args) + def self.single_record_table(data, cmd, args) hash = data.to_h keys = hash.keys.sort {|x, y| x.to_s <=> y.to_s }