active_object 5.12.0 → 5.13.0

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: 7cca57c6debc6ddba757fdd9ee484ad2d712ee112565f35e6a6ee8eac85f86fa
4
- data.tar.gz: f8cef2544ef1de5a5b42a519766110c3bb0f52b2de25176dd8bbffe0ba0188a6
3
+ metadata.gz: 96356d62c77b8ed4fa8ebc6718d62cfb21fd4aa04128bc1417e6c1dde058b34d
4
+ data.tar.gz: 12f5957033dc488fd53560bd154ec3a9e68fe1a292e393ff9783feefa133ef89
5
5
  SHA512:
6
- metadata.gz: fe306fe0c7f05498d35fabf0ca63fe97ad42c6677c6ab4160e96fc87812258882d48fc108143fe60a8081659e780e4f81edfac3fe4edab7a7c52e86dfc72ffd2
7
- data.tar.gz: d73c4d1148b1d3ef82662d7b42ed26310c511df020f9eb75f2d042a4a220813fc10e0923cd18f003195a3a1215cb5e13c47b219eeff6087928ebf165b4bf9681
6
+ metadata.gz: 138bd49f77c6e44eb6df253860c74562e3d5f2c2cfc1c4f7bf2aaa470d5e991a59119d1f454e54024a32778328ef4cf944d3d908f37de2552eeb6caf3f47b07e
7
+ data.tar.gz: 7e52ecc8abfced234babad08334700ff50197a16234f43666010a4ed04734c58a1433406738e78e77c25128c73cd69613344f7f77eddbf5f11cd94585c5cd97d
data/README.md CHANGED
@@ -1491,13 +1491,23 @@ h.slice!(:a, :b) #=> { c: 3, d: 4 }
1491
1491
  'Awesome Sting'.blank? #=> false
1492
1492
  ```
1493
1493
 
1494
+ **Bool:**
1495
+ `bool?` determines if an object is a true or false class.
1496
+
1497
+ ```ruby
1498
+ true.bool? #=> true
1499
+ 1.bool? #=> false
1500
+ 'false'.bool? #=> false
1501
+ ```
1502
+
1494
1503
  **Boolean:**
1495
1504
  `boolean?` determines if an object is an boolean.
1496
1505
 
1497
1506
  ```ruby
1498
- 1.boolean? #=> true
1499
- false.boolean? #=> true
1500
- 'foo'.boolean? #=> false
1507
+ true.boolean? #=> true
1508
+ 1.boolean? #=> true
1509
+ 'false'.boolean? #=> true
1510
+ 'foo'.boolean? #=> false
1501
1511
  ```
1502
1512
 
1503
1513
  **Date:**
@@ -19,6 +19,10 @@ module ActiveObject
19
19
  respond_to?(:empty?) ? object.empty? : !object
20
20
  end
21
21
 
22
+ def bool?
23
+ true? || false?
24
+ end
25
+
22
26
  def boolean?
23
27
  TRUE_VALUES.include?(self) || FALSE_VALUES.include?(self)
24
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveObject
4
- VERSION ||= '5.12.0'
4
+ VERSION ||= '5.13.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.12.0
4
+ version: 5.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-16 00:00:00.000000000 Z
11
+ date: 2019-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler