collection_utils 2.0.0 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be93bf3ee75c35ec31ddec4deaf498b9e6b64787
4
- data.tar.gz: 3bf11d6eb814dc595f9ff929939dbae2daad110b
3
+ metadata.gz: 1750992aa6525c66d2dbc0ef51b388fe87ef86b3
4
+ data.tar.gz: 1600f263b54e8b0e17ed902612d65957501af1e2
5
5
  SHA512:
6
- metadata.gz: 50cf2ca18e195ad0dddb8df31b1f88919fc4a6b98a576ae2b83053e5fba91596aed59f8a82108a161ca1cbcc039e6a449f36948b4825c283147f527e98487ab2
7
- data.tar.gz: 550aeb6cc93cfd1246f22f44fe946f1c79798072f289c71cb7ab11cc1635ebd1463db002db8b789c5c939511edd6a82edb15b53f6ce076da11a6aa1865fe80f6
6
+ metadata.gz: ece6900793ce45e5c8263cffcb77ab9c976d46468495fa9e3b532c9d80a1a33b94a0b212cc667b64f3f8191bfd2f83b160705d26ff304b1b95d89368cc3ebe17
7
+ data.tar.gz: 04beb356f165acc2aa7388b20c91799d27e4cbf6cbb4dcbc9a7078930c25d991f97dd3543fd2ce7ddcd784c3c847dd38c6b09d67cdff3913cb80a7a7105a1002
@@ -11,7 +11,10 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = ""
13
13
  spec.description = "CollectionUtils provide with basic collection templates
14
- like stack, queues and heaps e.t.c for easier development."
14
+ like stack(push, pop, peek), queues(enqueue, dequeue), heaps/tree(MinHeap, MaxHeap, BST)
15
+ and HashDeserializedObject(Converts a hash into object for easy access.
16
+ All the keys will become attributes of the object).
17
+ Check out the wiki at https://github.com/deeshugupta/collection_utils/wiki"
15
18
  spec.homepage = "https://github.com/deeshugupta/collection_utils"
16
19
  spec.license = "MIT"
17
20
 
@@ -93,6 +93,15 @@ module CollectionUtils
93
93
  return remove_instance_variable("@#{name.to_s}")
94
94
  end
95
95
 
96
+ # @return [Boolean] returns whether the HashDeserializedObject is empty or not
97
+ # @example check whether the object is empty or not
98
+ # => obj = CollectionUtils::HashDeserializedObject.new()
99
+ # => obj.empty? #true
100
+ # => obj.nil? #false
101
+ def empty?
102
+ return @original.empty?
103
+ end
104
+
96
105
  # Get original Hash used to build the object. It will grow as we insert more
97
106
  # values in the object
98
107
  # @return [Hash] original hash used to build the object
@@ -1,3 +1,3 @@
1
1
  module CollectionUtils
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collection_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - deeshugupta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-26 00:00:00.000000000 Z
11
+ date: 2017-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,9 +52,10 @@ dependencies:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: |-
56
- CollectionUtils provide with basic collection templates
57
- like stack, queues and heaps e.t.c for easier development.
55
+ description: "CollectionUtils provide with basic collection templates\n like stack(push,
56
+ pop, peek), queues(enqueue, dequeue), heaps/tree(MinHeap, MaxHeap, BST)\n and HashDeserializedObject(Converts
57
+ a hash into object for easy access.\n All the keys will become attributes of the
58
+ object). \n Check out the wiki at https://github.com/deeshugupta/collection_utils/wiki"
58
59
  email:
59
60
  - gupta.deeshu@gmail.com
60
61
  executables: []