From 2921a7c7b8ab27350108ae0e678947085ded7b94 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 9 Mar 2015 13:03:12 +0000 Subject: Don't use "::" for method-calls. Instead prefer ".". Flagged by rubocop --- lib/custodian/util/bytemark.rb | 2 +- lib/custodian/util/timespan.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/custodian/util') diff --git a/lib/custodian/util/bytemark.rb b/lib/custodian/util/bytemark.rb index 9753c18..c821b18 100644 --- a/lib/custodian/util/bytemark.rb +++ b/lib/custodian/util/bytemark.rb @@ -26,7 +26,7 @@ module Custodian # # Is the named target inside the Bytemark IP-range? # - def Bytemark.inside?( target ) + def self.inside?( target ) inside = false if ( BYTEMARK_RANGES.any?{|range| range.include?(IPAddr.new(target))} ) diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb index d3166c7..5340c65 100644 --- a/lib/custodian/util/timespan.rb +++ b/lib/custodian/util/timespan.rb @@ -53,8 +53,8 @@ module Custodian # def TimeSpan.to_hours( p_start, p_end ) - p_start = Custodian::Util::TimeSpan::to_hour(p_start) - p_end = Custodian::Util::TimeSpan::to_hour(p_end) + p_start = Custodian::Util::TimeSpan.to_hour(p_start) + p_end = Custodian::Util::TimeSpan.to_hour(p_end) # @@ -99,15 +99,15 @@ module Custodian # # Ensure all values are sane and reasonable. # - p_start = Custodian::Util::TimeSpan::to_hour(p_start) - p_end = Custodian::Util::TimeSpan::to_hour(p_end) - cur_hour = Custodian::Util::TimeSpan::to_hour(cur_hour) + p_start = Custodian::Util::TimeSpan.to_hour(p_start) + p_end = Custodian::Util::TimeSpan.to_hour(p_end) + cur_hour = Custodian::Util::TimeSpan.to_hour(cur_hour) # # Get the expanded hours # valid = - Custodian::Util::TimeSpan::to_hours( p_start, p_end ) + Custodian::Util::TimeSpan.to_hours( p_start, p_end ) # # Lookup to see if the specified hour is within the -- cgit v1.2.1