structure 0.27.7 → 0.27.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/structure.rb +6 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 118caad7cf3818df6269396705dd439fba604ee5
4
- data.tar.gz: 2e2740598ba800523a34b7458ee88e7da367600d
3
+ metadata.gz: 87ccc13eb4c4c3ebb122b04e5c90c499c7e3a840
4
+ data.tar.gz: a642d9034c315181ff036020e24446cc99814e10
5
5
  SHA512:
6
- metadata.gz: f31ccce5416479862f5198f0342fb8f09a880a468a29551a70bd780477c4fa2a0e41071d793b7b139e17592a6a8560a575dd4ec3edb40091348a5f3016010ead
7
- data.tar.gz: 1eb9198a77d800ac82715014afbcae9f1bee0e90fecaa77ed9b6beff6c5f3c8e9140f1638f79359d7256d690a1fec9cb12ca6ce82fefc7ff07ec2cee23a8fb82
6
+ metadata.gz: bdfb94870cf3cc49631f0ae1daec590cbae633944e8753857e57440849e6ea85c9119fd4005cf4e438b6f4749677fce5b93204140b09c0c19200217fca62e9bd
7
+ data.tar.gz: a8b143921b69c92d6ef49cf3853e9ce3f5381bcc6ee9d2637e2dcf6db7f16161ce9190cbb0b197f983e4b2a4be164bde283801d4ea84834274f25440a0d8c45a
@@ -18,7 +18,7 @@ module Structure
18
18
  end
19
19
 
20
20
  def inspect
21
- class_name = self.class.name || self.class.to_s.match(/#<(.*)>/)[1]
21
+ class_name = self.class.name || self.class.to_s.gsub(/[^\w:]/, '')
22
22
 
23
23
  "#<#{class_name} #{
24
24
  attributes
@@ -55,6 +55,11 @@ module Structure
55
55
 
56
56
  klass.module_eval(&blk) if block_given?
57
57
 
58
+ included_modules.each do |m|
59
+ next if m == Structure
60
+ klass.send(:include, m) unless klass.include?(m)
61
+ end
62
+
58
63
  attribute_names.each do |name|
59
64
  if instance_methods(false).include?(:"#{name}?")
60
65
  klass.module_eval "def #{name}?; #{name}; end"
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.27.7
4
+ version: 0.27.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari