diff options
author | Ron <rgnv@users.noreply.github.com> | 2018-04-27 06:24:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 06:24:56 -0700 |
commit | 2bb40ad4d9e31cf2cd63a373f7c607eb86547e46 (patch) | |
tree | c12b52f0acd5192c457fa07189c4946674cd11fb /lib/oxidized/input/cli.rb | |
parent | ec90b081f0fed05497ce6ae21e4b4ba4d44ecc01 (diff) | |
parent | 83a00943d7333fafdfe352173713a22a5ac89f6f (diff) |
Merge pull request #1 from wk/pr-1280
massage into rubocop compliance
Diffstat (limited to 'lib/oxidized/input/cli.rb')
-rw-r--r-- | lib/oxidized/input/cli.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/oxidized/input/cli.rb b/lib/oxidized/input/cli.rb index 660e173..d434e33 100644 --- a/lib/oxidized/input/cli.rb +++ b/lib/oxidized/input/cli.rb @@ -32,26 +32,25 @@ module Oxidized @pre_logout.each { |command, block| block ? block.call : (cmd command, nil) } end - def post_login _post_login=nil, &block + def post_login _post_login = nil, &block unless @exec @post_login << [_post_login, block] end end - def pre_logout _pre_logout=nil, &block + def pre_logout _pre_logout = nil, &block unless @exec - @pre_logout << [_pre_logout, block] + @pre_logout << [_pre_logout, block] end end - def username re=/^(Username|login)/ + def username re = /^(Username|login)/ @username or @username = re end - def password re=/^Password/ + def password re = /^Password/ @password or @password = re end - end end end |