rectify 0.5.1 → 0.5.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bb52531fbe65aee9be6c5e43aec7c17a0fd1a4c
4
- data.tar.gz: f74692f2e8a650d9db28f009bb6b45e15181aacb
3
+ metadata.gz: ffd5e82c02a959c4d8c766a987d1c792b7429f9c
4
+ data.tar.gz: 7b4c4098bf7c3cbe4542b91ba5c5f52cd431107c
5
5
  SHA512:
6
- metadata.gz: 72e3f936fca6a2b12023d71eed000e139b5d632e007e1513e65799fb295ed019a6de6d9959c2f95275c7ab635e6885f14be0c3139b733d9c483e3011089d6860
7
- data.tar.gz: e21d7e5cd1ae7e854c7988c97d9cb78f56103f99e565a3ea88e812cffe3634ec89f501f0eb33780d3cdc81f5e58a517da2bdf2c16195455eefe7f4d3aada144c
6
+ metadata.gz: 6ead461a3c15a5624c0da681619afa11e4d0e9049115e830457d6cdefe5d40279e296eba1f00b71e28c5396e3d51e595b2a717fc080c5768b7fb1df14f055d5b
7
+ data.tar.gz: 29b7fe574d3891a8856a4fdebd72385c46b4940c2d3519460862edd03bc8ba7f7a328a1281aeb38725d6f68d6ff1a149593616fe10157350461cc266bbbc442b
@@ -1,11 +1,17 @@
1
1
  module Rectify
2
2
  class StubForm
3
- attr_accessor :attributes
4
-
5
3
  def initialize(attributes)
6
4
  @attributes = attributes
7
5
  end
8
6
 
7
+ def attributes
8
+ @attributes.except!(:valid?)
9
+ end
10
+
11
+ def valid?
12
+ @attributes.fetch(:valid?, false)
13
+ end
14
+
9
15
  def invalid?
10
16
  !valid?
11
17
  end
@@ -1,3 +1,3 @@
1
1
  module Rectify
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rectify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Pike