material 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 001e76c7524044c648cc550bea30c45e0231e1325ac42a3a34bcc88e94830047
4
- data.tar.gz: 263cf16e1bc92aa6b26d8edcc35115470b1e52fb870c4a4cf425f9bb76b4e1d1
3
+ metadata.gz: 63ebb20e8ed5a0d33f0ade5fb366b7fbd8d71e071b2f02bcac3c75818d4eeb3f
4
+ data.tar.gz: 3f916b0ab6325d85f49060ae786931cccdd2e5d8708add24ee6016a9f106b6a4
5
5
  SHA512:
6
- metadata.gz: 286ac8f5d74bab70ae04a6fc98e964d96cc2c74f5c500cdaaf6b2b6e30121dd4ecfb52beae6405225c0b6d8314b844c0550aa29e9613dd45e2880dfd5b2dec66
7
- data.tar.gz: 9b5f40da273be9b2d5e45e98246fb8b94575e163add6848185e25a5922cb3468f2086f3bf5336b9a8e7ecefeb456ad70cc714cf50f7701c62fae480b8279be2a
6
+ metadata.gz: 7f4ab1195b1981c32be7d1c0972a150464a9ae30999d8d0fe9542deb24d576f85d647b8eaa04ecb48b93f448ca76731c4232c8be51278f39394ee9962b796a1b
7
+ data.tar.gz: 0dd76d3b7949042f30c5ee2eecf49154d86ad3e5cb8b4989cc8e98c85229a52f87d68ab4503a26ce4ae6d448ec1e559c262a8a8fe9f00d0e1b10bf669e20b008
@@ -28,12 +28,16 @@ module Material
28
28
  formatted_attributes.fetch(attribute)
29
29
  end
30
30
 
31
+ def display_attributes
32
+ attribute_names
33
+ end
34
+
31
35
  def attribute_values
32
- attribute_names.each_with_object({}) { |attribute, hash| hash[attribute] = public_send(attribute.to_sym) }
36
+ display_attributes.each_with_object({}) { |attribute, hash| hash[attribute] = public_send(attribute.to_sym) }
33
37
  end
34
38
 
35
39
  def attribute_types
36
- attribute_names.each_with_object({}) { |attribute, hash| hash[attribute] = type_for_attribute(attribute).type }
40
+ display_attributes.each_with_object({}) { |attribute, hash| hash[attribute] = type_for_attribute(attribute).type }
37
41
  end
38
42
 
39
43
  def formatted_attributes
@@ -44,9 +48,9 @@ module Material
44
48
 
45
49
  def sorted_attribute_names
46
50
  [
47
- (head_attributes & attribute_names),
48
- (attribute_names - head_attributes - tail_attributes).sort,
49
- (tail_attributes & attribute_names),
51
+ (head_attributes & display_attributes),
52
+ (display_attributes - head_attributes - tail_attributes).sort,
53
+ (tail_attributes & display_attributes),
50
54
  ].flatten
51
55
  end
52
56
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Material
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Garside
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport