getth 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.
- checksums.yaml +7 -0
- data/lib/getth.rb +57 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: abab8b0c9a47e1291a931967e2193249fe054aed
|
4
|
+
data.tar.gz: e9e14b19ef8005878ba76fc588f67cab871f1443
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1ca63ab463e36dcf5a2e767bb01ac38f774d88027d32817181bd20b832bacaea320a1ed7c05955c96fa218886875c232c86efcf5f29b5ac8a46f1c08393d69d0
|
7
|
+
data.tar.gz: 26467973852e7f83588272ea18a3bee52c6918e10204059e11f718def0b6d32b86775c5623808991f8c9ed7b04deb37f760dee87c98c18e706cc0fa2d65e2720
|
data/lib/getth.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
module Getth
|
2
|
+
def second
|
3
|
+
self[1]
|
4
|
+
end
|
5
|
+
|
6
|
+
def third
|
7
|
+
self[2]
|
8
|
+
end
|
9
|
+
|
10
|
+
def fourth
|
11
|
+
self[3]
|
12
|
+
end
|
13
|
+
|
14
|
+
def fifth
|
15
|
+
self[4]
|
16
|
+
end
|
17
|
+
|
18
|
+
def sixth
|
19
|
+
self[5]
|
20
|
+
end
|
21
|
+
|
22
|
+
def seventh
|
23
|
+
self[6]
|
24
|
+
end
|
25
|
+
|
26
|
+
def eighth
|
27
|
+
self[7]
|
28
|
+
end
|
29
|
+
|
30
|
+
def nineth
|
31
|
+
self[8]
|
32
|
+
end
|
33
|
+
|
34
|
+
def tenth
|
35
|
+
self[9]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class Array
|
40
|
+
include Getth
|
41
|
+
end
|
42
|
+
|
43
|
+
class String
|
44
|
+
include Getth
|
45
|
+
end
|
46
|
+
|
47
|
+
=begin
|
48
|
+
|
49
|
+
###########Example#############
|
50
|
+
arr = (1..10).to_a.shuffle => [9, 2, 7, 10, 3, 8, 4, 1, 5, 6]
|
51
|
+
arr.second => 2
|
52
|
+
arr.third => 7
|
53
|
+
arr.fourth => 10
|
54
|
+
arr.tenth => 6
|
55
|
+
"Hello".second => "e"
|
56
|
+
|
57
|
+
=end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: getth
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sagar Pandya
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-27 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: 'Use English-words to access elements within strings and arrays: second,
|
14
|
+
third, fourth upto tenth'
|
15
|
+
email: sarg@outlook.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/getth.rb
|
21
|
+
homepage: http://rubygems.org/gems/getth
|
22
|
+
licenses:
|
23
|
+
- Beerware
|
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.5.1
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: Getth
|
45
|
+
test_files: []
|