sebastian 0.3.0 → 0.3.1
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 +4 -4
- data/README.md +1 -1
- data/lib/sebastian/base.rb +8 -8
- data/lib/sebastian/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cceccb63d31b75fc23c27ded7649e672fa95769927d324df3cc81de7db8be599
|
4
|
+
data.tar.gz: baea76e1eee025eefa987f127335a35e58f5c9341183f0591c2d4463acaf8c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 383b4aec949115a881768dc2991a2662bc7291ac62bdc3607af246532fc3d926c8a283c48ff936484593e3c604118efac13b2e6378a515eb647b4b3325ef79b7
|
7
|
+
data.tar.gz: ecf8959c9cd8adca0001ed670da61cee469c56cac519e82c361e5298c69d5183fc871dc1761e8c4045f6cb80ebba209fb5247ad85aeccb64b16d03677a296cd4
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ You can also use `.perform!` to execute. It's like `.perform` but more dangerous
|
|
76
76
|
CreatePayment.perform!(email: 'ciel@phantomhive.com', amount: 500)
|
77
77
|
# => "payment_created"
|
78
78
|
CreatePayment.perform!(amount: 500)
|
79
|
-
# =>
|
79
|
+
# => Sebastian::InvalidResultError: Payment is not valid
|
80
80
|
```
|
81
81
|
|
82
82
|
### Validations
|
data/lib/sebastian/base.rb
CHANGED
@@ -26,20 +26,20 @@ module Sebastian
|
|
26
26
|
extend ActiveModel::Translation
|
27
27
|
|
28
28
|
class << self
|
29
|
-
def perform(
|
30
|
-
new(
|
29
|
+
def perform(attributes = {})
|
30
|
+
new(attributes).perform
|
31
31
|
end
|
32
32
|
|
33
|
-
def perform!(
|
34
|
-
new(
|
33
|
+
def perform!(attributes = {})
|
34
|
+
new(attributes).perform!
|
35
35
|
end
|
36
36
|
|
37
|
-
alias
|
38
|
-
alias
|
37
|
+
alias attributes attr_accessor
|
38
|
+
alias attribute attributes
|
39
39
|
end
|
40
40
|
|
41
|
-
def initialize(
|
42
|
-
assign_attributes(
|
41
|
+
def initialize(attributes = {})
|
42
|
+
assign_attributes(attributes)
|
43
43
|
end
|
44
44
|
|
45
45
|
def perform
|
data/lib/sebastian/version.rb
CHANGED