Skip to content

Commit

Permalink
change if-else statement to case
Browse files Browse the repository at this point in the history
  • Loading branch information
NARKOZ committed May 20, 2014
1 parent b1602d2 commit 01fe039
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/gitlab/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ def self.run(cmd, args=[])
exit(1)
end

if data.kind_of? Gitlab::ObjectifiedHash
case data
when Gitlab::ObjectifiedHash
puts single_record_table(data, cmd, args)
elsif data.kind_of? Array
when Array
puts multiple_record_table(data, cmd, args)
else
puts data.inspect
end
end
end
Expand Down

0 comments on commit 01fe039

Please sign in to comment.