validatepalindrome 0.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/validatepalindrome.rb +15 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f6e18a38fa93825b597dffc7aedf06993694cfd5
4
+ data.tar.gz: 303172b7b5326c392176fa38b27e277fcae6d071
5
+ SHA512:
6
+ metadata.gz: 38eb99c13e5cb9e3498756b18015e0cdca1f79d3ac7daa82945ef515ba4421057abfcaae13483524e45eaefbcccdbf6444d3ec3849653f62bec47a424956a0b4
7
+ data.tar.gz: e19ed3cbd7cff9abd5b43ef1c12ed29b70b9a82231acbf85af06e29376f297ac26abc1ee562a249decddb5950a7218143c426af23039b71c10162e74e5380e1c
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ #Validate if the word or sentence is a palindrome
4
+ #Params:
5
+ #+something+:: It is the string to validate.
6
+ def validate_palindrome?(something)
7
+ something.gsub!(/\s+/, "") #Removes white spaces
8
+ puts something
9
+ puts something.reverse
10
+ something == something.reverse
11
+ end
12
+
13
+ print "Write something : "
14
+ palindrome = gets
15
+ validate_palindrome?(palindrome)
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: validatepalindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Aville
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Return true or false if the string is a palindrome
14
+ email: a.villegas.rodriguez@accenture.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/validatepalindrome.rb
20
+ homepage: http://rubygems.org/gems/validatepalindrome
21
+ licenses:
22
+ - Nonstandard
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Validate Palindrome
44
+ test_files: []