summaryrefslogtreecommitdiff
path: root/lib/custodian/util
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:15 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:15 +0000
commitaf2ee063abea8235a8cbd1448533e4f4fbc0d0af (patch)
tree969e448e2d5995f7e838a68ef1d25d54df9b8d29 /lib/custodian/util
parentbb2ec1f07af747c69f2fd1e5b70c41b35fb069e6 (diff)
Prefer single-quotes when you don't need interpolation.
So "foo" is less good than 'foo'.
Diffstat (limited to 'lib/custodian/util')
-rw-r--r--lib/custodian/util/ping.rb6
-rw-r--r--lib/custodian/util/timespan.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/custodian/util/ping.rb b/lib/custodian/util/ping.rb
index 771cfd6..cf79754 100644
--- a/lib/custodian/util/ping.rb
+++ b/lib/custodian/util/ping.rb
@@ -26,8 +26,8 @@ module Custodian
#
def initialize( hostname )
- raise ArgumentError, "Hostname must not be nil" if hostname.nil?
- raise ArgumentError, "Hostname must be a String" unless hostname.kind_of?( String )
+ raise ArgumentError, 'Hostname must not be nil' if hostname.nil?
+ raise ArgumentError, 'Hostname must be a String' unless hostname.kind_of?( String )
@hostname = hostname
@resolved = Custodian::Util::DNS.hostname_to_ip( hostname )
@@ -83,7 +83,7 @@ module Custodian
return true
end
else
- puts "ERROR: Resolved to neither an IPv6 or IPv4 address."
+ puts 'ERROR: Resolved to neither an IPv6 or IPv4 address.'
end
false
end
diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb
index 36e8d9e..a033675 100644
--- a/lib/custodian/util/timespan.rb
+++ b/lib/custodian/util/timespan.rb
@@ -33,7 +33,7 @@ module Custodian
#
# Ensure within a valid range
#
- raise ArgumentError, "Integer required for time" unless( desc.kind_of? Integer )
+ raise ArgumentError, 'Integer required for time' unless( desc.kind_of? Integer )
raise ArgumentError, "Invalid time: #{desc}" unless( ( desc >= 0 ) && ( desc <= 23 ) )