getth 0.0.6 → 0.0.7

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 +4 -4
  2. data/lib/getth.rb +1 -1
  3. metadata +7 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa6a3546b8f6ecbcfae90d86e15a2d5c5d367148
4
- data.tar.gz: cf089cbd3ef76d9d385d51f4dbc4026c261e21d8
3
+ metadata.gz: 8440aa34d6054e56a7f663b2b975d1f2772bc1d6
4
+ data.tar.gz: dfde3d2ded5aee304bd7d67e0bb5ff2edd4da2dc
5
5
  SHA512:
6
- metadata.gz: fbfba2b7565671f8d6f1b2fb5369770c3bfda7ed9c15850ed6a68112735f5b048867a728428cd194cebf0fcbccc67af0fb824b7d5b4378a0a4de4e5d5c4073c2
7
- data.tar.gz: 4645d2afe450362049519e1b29f509364c6f3bb9e7d7abe184eda63c2c43ab42f3023357c070144db10a2bcf14bb853d132e8f157de2ed3f2bf7540c8e7febf1
6
+ metadata.gz: eb368593e475fb2f1a07d9d8fafa38025fdb128b1230d5a7d9a19c9df73b9d3d40dbc99165469c27fe74eece21a16b65cef1b08ef82a934a004c228d46dd45de
7
+ data.tar.gz: 7f833b1d9e5e61ea848942167b2923d00fe2364ac9c1518b9476fd69a68e1c4acbe418d885bb101840bf47979272287259aed2c30db2f14e5ee2680f0eb8ff19
@@ -18,6 +18,6 @@ class String
18
18
  end
19
19
 
20
20
  def last(n = 1)
21
- n > self.size ? self[-self.size..-1] : self[-n..-1]
21
+ n > self.size ? self : self[-n..-1]
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sagar Pandya
@@ -24,10 +24,10 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- description: This gem defines methods first, second, third ... ninth, tenth etc for
28
- retrieving values from strings and arrays. The Array and String classes have been
29
- monkey-patched in order to achieve this. Core Array already includes a last-instance-method
30
- but since String does not, I have had to add it.
27
+ description: This gem defines ordinal methods *first, second, third ... ninth, tenth
28
+ & last* for retrieving values from strings. Ruby Core already includes a Array#first
29
+ and Array#last so only *second, third ... ninth & tenth* have been added to the
30
+ Array class.
31
31
  email: sarg@outlook.com
32
32
  executables: []
33
33
  extensions: []
@@ -57,5 +57,6 @@ rubyforge_project:
57
57
  rubygems_version: 2.6.8
58
58
  signing_key:
59
59
  specification_version: 4
60
- summary: Getth
60
+ summary: 'Retrieve string characters or array elements using ordinal-methods e.g "hello".third
61
+ #=> l'
61
62
  test_files: []