obender 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/lib/obender.rb +20 -0
 - metadata +44 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA256:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e6b785cc688b925432951e76f7d0f3ecd917b2770b2d6a0f3777e4e3f675019c
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1b3d0bf15924585d69f6cab0d0dc1e15ca4ff113a567be6a8582979eecb872ab
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 98e0d7917eb5116c26f057cd984f62bfe53d124c3367c2c23a1c2e1db9c0378f07f69d043f191827d1249b713e4c8c140b5842a1a4df10d3d4ade55f86371a77
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 7c599ec522966c18946a20d47e0e20aa2b57e8e0a9927a16ecaf8a6e529d35dc3a67bbcf46118fb2a8e48023ca13333c94c7c7f177051199974d5ecd6286c992
         
     | 
    
        data/lib/obender.rb
    ADDED
    
    | 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class OBender
         
     | 
| 
      
 2 
     | 
    
         
            +
              def initialize(*args)
         
     | 
| 
      
 3 
     | 
    
         
            +
                @args = args
         
     | 
| 
      
 4 
     | 
    
         
            +
              end
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def vasyuki
         
     | 
| 
      
 7 
     | 
    
         
            +
                return @args[0].map { |arg| [arg] } if @args.size == 1
         
     | 
| 
      
 8 
     | 
    
         
            +
                return [] if @args.size == 0
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                @args.reduce do |acc, item|
         
     | 
| 
      
 11 
     | 
    
         
            +
                  result = []
         
     | 
| 
      
 12 
     | 
    
         
            +
                  acc.each do |a|
         
     | 
| 
      
 13 
     | 
    
         
            +
                    item.each do |i|
         
     | 
| 
      
 14 
     | 
    
         
            +
                      a.kind_of?(Array) ? result << (a + [i]) : result << ([a] + [i])
         
     | 
| 
      
 15 
     | 
    
         
            +
                    end
         
     | 
| 
      
 16 
     | 
    
         
            +
                  end
         
     | 
| 
      
 17 
     | 
    
         
            +
                  result
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,44 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: obender
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Yegor Tikhanin
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-08-13 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies: []
         
     | 
| 
      
 13 
     | 
    
         
            +
            description: Gem is designed to combine all options of arrays based on incoming arrays.
         
     | 
| 
      
 14 
     | 
    
         
            +
              Incoming arrays can be any number
         
     | 
| 
      
 15 
     | 
    
         
            +
            email: yegor.tikhanin@gmail.com
         
     | 
| 
      
 16 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 17 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 18 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 19 
     | 
    
         
            +
            files:
         
     | 
| 
      
 20 
     | 
    
         
            +
            - lib/obender.rb
         
     | 
| 
      
 21 
     | 
    
         
            +
            homepage: https://github.com/windyeti/obender
         
     | 
| 
      
 22 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 23 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 24 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 25 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 26 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 27 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 28 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 29 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 32 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 34 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 35 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 36 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 37 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 38 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 39 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 40 
     | 
    
         
            +
            rubygems_version: 3.1.2
         
     | 
| 
      
 41 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 42 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 43 
     | 
    
         
            +
            summary: Combinations of Incoming Arrays
         
     | 
| 
      
 44 
     | 
    
         
            +
            test_files: []
         
     |