structure 0.28.5 → 0.28.6

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/structure.rb +4 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a158acd0d19fb497f1a4f27f61f06f948f93d0ac
4
- data.tar.gz: 486e59f519adb28fd005fd0271674e37727399ff
3
+ metadata.gz: 9bf9143686b35d2943e1f00ebd5d6d8ebd125f68
4
+ data.tar.gz: af989c46bf1020bda14a60d37c2a177198b8096a
5
5
  SHA512:
6
- metadata.gz: 39eaa7d3d4dbb630c0df9f6c85ab7aea49ea6b6b42c492998899bad758df80bba5a5c6d53ac892c2ad7239889ec2024cb6df133e333807ece7275c8d269342c8
7
- data.tar.gz: 8369d5557f02d08906f6632a604a3b37f25f8a4153156e958a63cfcc3db26221af95b4eb866c0c292dcfcdaa45f27ebe330dbfa4bfabd3200ea1eef7ef3fc801
6
+ metadata.gz: 9e64253dab58e9f86054cc1306ff65b8062c73aaae8cd6ffced3e9d0fed3c24ffff250bb7cfacb9671d774726856e4049fb8d769a42bcc6da37d3dd9f96c437c
7
+ data.tar.gz: 9b60d37cc9bf25968abcd3b22257d5b8c1297c2f4c8935db7c145c21a04c6d7844350b901c73c9c90bed43c9c12915ef77c123fc2c81dc887ecf806be0cf3c7b
data/structure.rb CHANGED
@@ -5,7 +5,7 @@ module Structure
5
5
 
6
6
  def attributes
7
7
  attribute_names.reduce({}) { |ret, key|
8
- val = self.send(key)
8
+ val = send(key)
9
9
 
10
10
  ret.update(key =>
11
11
  if val.respond_to?(:attributes)
@@ -32,8 +32,9 @@ module Structure
32
32
  class_name = self.class.name || self.class.to_s.gsub(/[^\w:]/, '')
33
33
 
34
34
  "#<#{class_name} #{
35
- attributes
36
- .map { |key, val|
35
+ attribute_names
36
+ .map { |key|
37
+ val = send(key)
37
38
  if val.is_a?(Array)
38
39
  "#{key}=[#{val.take(3).map(&:inspect).join(', ')}" + (val.size > 3 ? '...' : '') + ']'
39
40
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.5
4
+ version: 0.28.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari