Sha256: c13bd8e73bb00f981820cce24e5a96d40b51e324ab7eccf5ca34fa1a22202e31

Contents?: true

Size: 458 Bytes

Versions: 7

Compression:

Stored size: 458 Bytes

Contents

module AssOle
  module Snippets
    #
    module Shared
      # Snippet for worcking with 1C Array object
      module Array
        is_ole_snippet

        # Returns new 1C Array
        # @return [WIN32OLE]
        def array(*args)
          args_ = (args.size == 1) && (args[0].is_a? ::Array) ? args[0] : args
          args_.each_with_object(newObject('Array')) do |val, obj|
            obj.add val
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ass_ole-snippets-shared-0.5.0 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.4.0 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.3.2 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.3.1 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.3.0 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.2.0 lib/ass_ole/snippets/shared/array.rb
ass_ole-snippets-shared-0.1.2 lib/ass_ole/snippets/shared/array.rb