Sha256: 7e0dc5dc076624f63c07cf443d053821d0afb9c1b08a82fbb45b4fa7d0b9d3aa

Contents?: true

Size: 208 Bytes

Versions: 2

Compression:

Stored size: 208 Bytes

Contents

module ClockWindow
  module Refinements
    module AddIf
      refine Array do
        def add_if(expr)
          self.insert(-1, *Array(yield)) if expr
          self
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clock_window-0.0.6 lib/clock_window/refinements.rb
clock_window-0.0.5 lib/clock_window/refinements.rb