diff options
author | Abinoam Praxedes Marques Junior <abinoam@gmail.com> | 2019-01-23 15:56:01 -0300 |
---|---|---|
committer | Abinoam Praxedes Marques Junior <abinoam@gmail.com> | 2019-01-23 15:56:01 -0300 |
commit | a64b52365b7ebb1f8a16999d518b688182c22292 (patch) | |
tree | 3a84d54d061f441a1f0dcf5dc14c8d6e84b2d530 | |
parent | 104be004c62deeb34872f490df253bbba18ed3f4 (diff) | |
download | highline-a64b52365b7ebb1f8a16999d518b688182c22292.tar.gz |
Apply Rubocop suggestions
-rw-r--r-- | .rubocop.yml | 3 | ||||
-rw-r--r-- | lib/highline/terminal/io_console.rb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 29b5448..c2da202 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,7 @@ # https://github.com/bbatsov/rubocop/tree/master/config AllCops: - TargetRubyVersion: 1.9 + TargetRubyVersion: 2.1 # General @@ -50,7 +50,6 @@ Naming/MethodName: # SupportedStyles: when_needed, always, never Style/Encoding: Enabled: true - EnforcedStyle: always # If we fix this, it will change method signature. # Save it for major release. diff --git a/lib/highline/terminal/io_console.rb b/lib/highline/terminal/io_console.rb index 0d75079..d28ee0d 100644 --- a/lib/highline/terminal/io_console.rb +++ b/lib/highline/terminal/io_console.rb @@ -1,4 +1,4 @@ -# coding: utf-8 +# frozen_string_literal: true class HighLine class Terminal @@ -26,7 +26,7 @@ class HighLine end # (see Terminal#get_character) - def get_character # rubocop:disable Naming/AccessorMethodName + def get_character input.getch # from ruby io/console rescue Errno::ENOTTY input.getc |