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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 132924c09476de5872f7c0df625965de02230dea
4
- data.tar.gz: e9e43a18c353b8fcb204bf2c9abf748bd790c00d
3
+ metadata.gz: 78f5455c6b97c8287e3f65dae994aa9b0037c9a9
4
+ data.tar.gz: 71aff4625c628642a8221162045fcc6e9c9fcf76
5
5
  SHA512:
6
- metadata.gz: fdf446baa6982dba695dbf5eb8a49c768dd82c8ea02a259e5b695a1f1fb1348c5615223e42b662925fa5c16939f02d442ffe44dcb63fe0eac1579dc1d1215192
7
- data.tar.gz: aec48caee7e13737f71acd9128e943fb6deb1dac74cfff7c91d5b237780f57521c5b62acc43d9d088c02a85d79081b016a479ea40bcc4086f12bfeb1e2734122
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
 
@@ -1,3 +1,3 @@
1
1
  module PresenterObject
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-10 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler