Sha256: 74e0c1c2a2ae6254cd9be57fdc3c5d168c62ad2808594bb98c0d1c46869539ca

Contents?: true

Size: 357 Bytes

Versions: 23

Compression:

Stored size: 357 Bytes

Contents

module Analytical
  class CommandStore
    attr_accessor :commands

    def initialize(initial_list=nil)
      @commands = initial_list || []
    end

    def flush
      @commands = []
    end

    # Pass any array methods on to the internal array
    def method_missing(method, *args, &block)
      @commands.send(method, *args, &block)
    end

  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
analytical-2.2.0 lib/analytical/command_store.rb
analytical-2.1.0 lib/analytical/command_store.rb
analytical-2.0.0 lib/analytical/command_store.rb