presenter_object 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/presenter_object/presentable.rb +4 -0
- data/lib/presenter_object/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78f5455c6b97c8287e3f65dae994aa9b0037c9a9
|
4
|
+
data.tar.gz: 71aff4625c628642a8221162045fcc6e9c9fcf76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d5de1c395f145fd70d697d46fb6f21594a764ee2b27ccbac6da2ba92d43b9501aafaa1172d4cf0a4d31d4e303250f8313acbf4a4fd01cc5bb8898ebbff365d
|
7
|
+
data.tar.gz: 25f688a0d874663f2455081dc7a501dcb86707a3f5ac3ef57328d51a73370d28f612880c9509dca58eaac397c49bb4a5d4274bba75f23e5e00e29eff9de57248
|
@@ -11,9 +11,13 @@
|
|
11
11
|
module PresenterObject::Presentable
|
12
12
|
extend ActiveSupport::Concern
|
13
13
|
|
14
|
+
PresenterNotRegistered = Class.new KeyError
|
15
|
+
|
14
16
|
module ClassMethods
|
15
17
|
def presenter_class
|
16
18
|
PresenterObject::Base.presenters.fetch name
|
19
|
+
rescue KeyError
|
20
|
+
raise PresenterNotRegistered, "No presenter registered for #{name}. Is it defined and loaded?"
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: presenter_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Salazar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08
|
11
|
+
date: 2016-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|