abstracts 1.0.4 → 1.0.5

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/lib/abstracts.rb +15 -12
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a3ead15beb3d2062875802e791324d858ca1397
4
- data.tar.gz: 594b516fd448bb82809ccb4fe30cb3dbf86c92e5
3
+ metadata.gz: 0346f0dedeb5e72946e84c11cb976b5a9d779be5
4
+ data.tar.gz: 80981d4c18977ca47d4c729576d3c5f28029bff5
5
5
  SHA512:
6
- metadata.gz: 0a90bf9404224188b15111e84545760d97cd691004a26438a8ef8e2d73b5c8972125a6e572a3c45f155c5d92b9ddd60babad76a60c8ec4aa011fd616974cc79d
7
- data.tar.gz: 6fec79369aa06e4c0e51d7a9c5eeafbb3939584967199a5f2af9f66add41efc188889a7fa1cbc3e5bc941e96921e46d58ae4ae472224416dc3210f286b07f81a
6
+ metadata.gz: aaa33b12f3c88641b9fcc9d6d1087c83e837985690ca8a0e082e5804172d61eb9c92e9f4909a6498e5c880b6bad584aed876df036341db39909af50e69df85a8
7
+ data.tar.gz: 5a497cc58235437fce5189b1cb8aadf30b3f53dcb5b365e2106f95a0d9d8fff2b6afc9babfd5d4f8d51cfbc9b6df29b63b276d426722d2d05d5f126e4ad2ca70
@@ -1,17 +1,6 @@
1
1
  # Abstract module
2
2
  module Abstract
3
- # Abstract::Object class
4
- class Object
5
- # Get an array of attr_accessor names
6
- # @return [Array] - Array of attribute accessor methods
7
- def attrs
8
- self.class.instance_eval do
9
- @attrs.each do |attr|
10
- attr_accessor attr
11
- end
12
- end
13
- end
14
-
3
+ module Object
15
4
  # Check if object is blank
16
5
  # @return [Trueclass, FalseClass] - is object nil or empty
17
6
  def blank?
@@ -24,6 +13,20 @@ module Abstract
24
13
  end
25
14
  end
26
15
 
16
+ # Abstract::Object class
17
+ class Object
18
+ # Get an array of attr_accessor names
19
+ # @return [Array] - Array of attribute accessor methods
20
+ def attrs
21
+ self.class.instance_eval do
22
+ @attrs.each do |attr|
23
+ attr_accessor attr
24
+ end
25
+ end
26
+ end
27
+
28
+ end
29
+
27
30
  # Abstract::Builder class
28
31
  class Builder
29
32
  attr_reader :object
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstracts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vsevolod Suzdaltsev
@@ -41,5 +41,5 @@ rubyforge_project:
41
41
  rubygems_version: 2.6.6
42
42
  signing_key:
43
43
  specification_version: 4
44
- summary: Abstract classes + stuff
44
+ summary: Abstract classes & modules
45
45
  test_files: []