Sha256: 2286a4691b3e6b1c84ac29355578606d17356a7ee634412690d493b4b0e095af
Contents?: true
Size: 472 Bytes
Versions: 4
Compression:
Stored size: 472 Bytes
Contents
class Array # Constructs an array of timeframes representing the "gaps" left by the given array of timeframes. # # To use this feature, you must explicitly require 'timeframe/core_ext/array' def multiple_timeframes_gaps_left_by(*time_frames) raise ArgumentError.new 'You can only use timeframe for this operation' unless [self + time_frames].flatten.all?{|el| el.is_a?(Timeframe)} self.inject([]){|a,b| a << b.gaps_left_by(*time_frames)}.flatten end end
Version data entries
4 entries across 4 versions & 1 rubygems