table_display 2.1.0 → 2.2.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 +4 -4
- data/lib/table_display.rb +1 -10
- data/lib/table_display/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ab02c79fd9b3770bb178f6f3c3590c9a093083e9197ccb8f66ff3621592a576
|
4
|
+
data.tar.gz: cb41a962edd1f01ba20713ed399d832b3c11ffa22821e93d35be997febd91dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6358e5e8bd78130d3af0a61355152896a8ca26177a9bb0b647dd21e814d94b4d8aa6041af45c8c415bda683ee02372fda0839ba583b106ed9162b21d60a34c36
|
7
|
+
data.tar.gz: 9e430ecb3ac310bab0d168bcf4a9333562b118bbcf4c2d08de01497866801bb2b55f2aae9945e7901788323e0450a685e1b18b8c77a74c0bba1420f9211f7fa2
|
data/lib/table_display.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Enumerable
|
2
2
|
def to_table_display(*args)
|
3
3
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
4
4
|
extra_entries = args.collect { |arg| arg.respond_to?(:call) ? arg : arg.to_s }
|
@@ -108,12 +108,3 @@ module Kernel
|
|
108
108
|
puts target.respond_to?(:to_table_display) ? target.to_table_display(*options) : target
|
109
109
|
end
|
110
110
|
end
|
111
|
-
|
112
|
-
# all Enumerable classes should get TableDisplay functionality...
|
113
|
-
Enumerable.send(:include, TableDisplay)
|
114
|
-
|
115
|
-
# including those that have already included Enumerable by the time this plugin is loaded.
|
116
|
-
# Ruby doesn't recursively update through the module tree, so although any new classes/modules
|
117
|
-
# that include Enumerable will get TableDisplay, we have to do it ourself for older ones.
|
118
|
-
ObjectSpace.each_object(Module) {|o| o.send(:include, TableDisplay) if o.ancestors.include?(Enumerable)}
|
119
|
-
ObjectSpace.each_object(Class) {|o| o.send(:include, TableDisplay) if o.ancestors.include?(Enumerable)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_display
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Bryant
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|