diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-07-07 05:24:23 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-07-07 05:31:51 -0300 |
commit | 8e9b826acfe47b049b3376ea1b2b9fd51c60e2e0 (patch) | |
tree | 2e685caea0f5067d7f260bd596f9c264b203bc85 /lib/highline | |
parent | 653dd52f6f8a90d3a43cdd0a76d6221050b9d3f4 (diff) | |
download | highline-8e9b826acfe47b049b3376ea1b2b9fd51c60e2e0.tar.gz |
Use guard clauses (rubocop warning)
Diffstat (limited to 'lib/highline')
-rw-r--r-- | lib/highline/menu.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/highline/menu.rb b/lib/highline/menu.rb index b1205d8..5f73cd7 100644 --- a/lib/highline/menu.rb +++ b/lib/highline/menu.rb @@ -269,11 +269,11 @@ class HighLine def index=(style) @index = style + return unless @index == :none || @index.is_a?(::String) + # Default settings. - if @index == :none || @index.is_a?(::String) - @index_suffix = " " - @select_by = :name - end + @index_suffix = " " + @select_by = :name end # |