Sha256: 82d4781d9a53ae9ae8f275e6ade08ba908c01189311051ad02d93d90c5c8073a

Contents?: true

Size: 431 Bytes

Versions: 32

Compression:

Stored size: 431 Bytes

Contents

class Array

    # @param    [#to_s, Array<#to_s>]  tags
    #
    # @return [Bool]
    #   `true` if `self` contains any of the `tags` when objects of both `self`
    #   and `tags` are converted to `String`.
    def includes_tags?( tags )
        return false if !tags

        tags = [tags].flatten.compact.map( &:to_s )
        return false if tags.empty?

        (self.flatten.compact.map( &:to_s ) & tags).any?
    end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
cuboid-0.2.11 lib/cuboid/ruby/array.rb
cuboid-0.2.10 lib/cuboid/ruby/array.rb
cuboid-0.2.9 lib/cuboid/ruby/array.rb
cuboid-0.2.8 lib/cuboid/ruby/array.rb
cuboid-0.2.7 lib/cuboid/ruby/array.rb
cuboid-0.2.6 lib/cuboid/ruby/array.rb
cuboid-0.2.5 lib/cuboid/ruby/array.rb
cuboid-0.2.4.2 lib/cuboid/ruby/array.rb
cuboid-0.2.4.1 lib/cuboid/ruby/array.rb
cuboid-0.2.4 lib/cuboid/ruby/array.rb
cuboid-0.2.3 lib/cuboid/ruby/array.rb
cuboid-0.2.2 lib/cuboid/ruby/array.rb
cuboid-0.2.1 lib/cuboid/ruby/array.rb
cuboid-0.2 lib/cuboid/ruby/array.rb
cuboid-0.1.9.1 lib/cuboid/ruby/array.rb
cuboid-0.1.9 lib/cuboid/ruby/array.rb
cuboid-0.1.8 lib/cuboid/ruby/array.rb
cuboid-0.1.7 lib/cuboid/ruby/array.rb
cuboid-0.1.6.1 lib/cuboid/ruby/array.rb
cuboid-0.1.6 lib/cuboid/ruby/array.rb