-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bug fix for using ip service #42
base: master
Are you sure you want to change the base?
Conversation
all_switch = all == nil ? "" : "-a" | ||
return `#{ifconfig_path} #{all_switch}` if not ifconfig_path == nil | ||
return `#{ifconfig_path} a` if not ifconfig_path == nil && all != nil | ||
return `#{ifconfig_path} ""` if not ifconfig_path == nil && all == nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Favor unless over if for negative conditions.
Use ! instead of not.
Prefer the use of the nil? predicate.
@@ -583,8 +583,8 @@ def self.ifconfig(all=nil) | |||
all = nil | |||
end | |||
|
|||
all_switch = all == nil ? "" : "-a" | |||
return `#{ifconfig_path} #{all_switch}` if not ifconfig_path == nil | |||
return `#{ifconfig_path} a` if not ifconfig_path == nil && all != nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Favor unless over if for negative conditions.
Use ! instead of not.
Prefer the use of the nil? predicate.
Prefer !expression.nil? over expression != nil.
No description provided.