split_name 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 +15 -0
- data/lib/split_name.rb +14 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
ZDA2ZTJmYjY0MWYyZGZhOTdhM2Q2ZDU3NGQzMTE2ZjVkYzA1MjZlMg==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
YjE4MmNlNzJhNGI2OWY1ZWRjMjJhOWE2ZmI2NWJiYzc2YmFjNzJhYw==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
OGU1MGM4MGU4YjJhNWI4ZmI2MDkzMmQwZWU3NDBhZjI5MGVjY2VkYzgyMmE0
|
|
10
|
+
OTQwOWU2NWUwYTc5ZGQwZDllYjNmYmRiNjNmNjk0NTNhZTUxZjIzYmI2ZmFi
|
|
11
|
+
NmZhNjkxZjkyYzFmMmM4NDA1NTQ4ZDk4Yzc3NGVhOThiOGM2OWI=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
MWQ3MTAzNGVkOGFiZDQxNGY5Y2FjMTUwNTg4MjRmODg5NTA3N2NjM2RmNTI1
|
|
14
|
+
MGIwM2Y3NzUzOGZhZjZmMzgzMWM4MzBjZjk2ZTc1OGY5ZjJmM2EzZjNmNzAw
|
|
15
|
+
NDdiZGM4MTg2YjBhODk4OGNjNmIxNmNlNDU3Y2RkNTE2ODZjZTg=
|
data/lib/split_name.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class Split
|
|
2
|
+
def first_name_from_full_name(name)
|
|
3
|
+
full_name = name
|
|
4
|
+
name = full_name.split
|
|
5
|
+
first_name = name.delete_at(0).to_s
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def last_name_from_full_name(name)
|
|
9
|
+
full_name = name
|
|
10
|
+
name = full_name.split
|
|
11
|
+
first_name = name.delete_at(0).to_s
|
|
12
|
+
last_name = name.join(' ')
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: split_name
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Satheesh kumar
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: ! 'The library used to split first_name and last_name from full name '
|
|
14
|
+
email:
|
|
15
|
+
- satheeshcsedct@gmail.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/split_name.rb
|
|
21
|
+
homepage: http://rubylearning.org/
|
|
22
|
+
licenses: []
|
|
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.0.6
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: To split first_name and last_name from full name
|
|
44
|
+
test_files: []
|