string-include_any 1.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/string-include_any.rb +7 -0
  3. metadata +45 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bbfa87c12a4cdbdd4868bf5a5e596c01f8066a09
4
+ data.tar.gz: bd3aabd10086bf821bc96f471c636cbecc8d08fc
5
+ SHA512:
6
+ metadata.gz: 032f51b6dd93e7b74cd91453503266f2bb2778b915bb5521ebe08abad196765147aff49332761a9714fcd483b0e5abbfa99e94aa7daf650bb1a7c23d685bc161
7
+ data.tar.gz: 0e67a8600f50cf3149f208af1fd00bbc809e1736be1dcfbdbf7532834be44c5ef8c2852469ff3faa884e8c0658f528a994d0283bf4f619f8994bd44ac4e1b29e
@@ -0,0 +1,7 @@
1
+ class String
2
+ def include_any?(*args)
3
+ raise ArgumentError, "Requires at least one argument" if args.length == 0
4
+ raise ArgumentError, "Must enter all String arguments" unless args.all? {|arg| arg.instance_of? String}
5
+ args.any? {|arg| include? arg}
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: string-include_any
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Henry Firth
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Adds an instance method for String class to see if a string includes
14
+ one or more substrings
15
+ email: henrynf12@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/string-include_any.rb
21
+ homepage: https://github.com/H12/string-include_any
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
+ rubyforge_project:
41
+ rubygems_version: 2.4.5.1
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Adds :include_any? method to String class
45
+ test_files: []