pragma 0.1.0 → 0.1.1

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: 791ad06332320a27e0d54dac93e730e141e7ccf4
4
- data.tar.gz: b46f3e7cb4147dd5b4f1e87593b979ae30b67a4c
3
+ metadata.gz: 37c47b2f76d464f81e6611ec84accd125eef3b45
4
+ data.tar.gz: a2f6182c7b4d4d8a201dcb330e2f294448154513
5
5
  SHA512:
6
- metadata.gz: f9abcf4edfd280bfff4d932acfc40f4ff37856d1fa489abf4aba78ea04be9d95baca5109f6badcb615ac5b3ab916e66cc63c598c3c767d0c8e0fae0e5da03f91
7
- data.tar.gz: 159c12e39c2f26d778b115d18543e9505eaef25eca6ddbc27cab4436e8fa74bc898be814281b7518f1b8255d58ca1a49fad28b73f22d285fb9e7dd180fd77224
6
+ metadata.gz: 44b5d55c2e90634907a72ec35a2f054279835f3c099de10f432ba3109bef6ef935edefaa318cd56e4e265b29cb24e94c194e5bca59aeacf71c3b7b5a62e0dba5
7
+ data.tar.gz: c44c4dd1b8fbc077928e672b6a978bb52e620a9a37c4decf5d1621476f1205fd064410bbdd4a0cb218ffe172c8d4f8ac5f04cb4e9629b5f640c41fc1534fc3bd
@@ -14,24 +14,36 @@ module Pragma
14
14
  #
15
15
  # If the operation name is +API::V1::Post::Operation::Show+, returns
16
16
  # +API::V1::Post::Decorator+.
17
+ #
18
+ # @return [Class]
17
19
  def decorator_klass
18
- super || (computed_decorator_klass if class_exists?(computed_decorator_klass))
20
+ super || (
21
+ Object.const_get(computed_decorator_klass) if class_exists?(computed_decorator_klass)
22
+ )
19
23
  end
20
24
 
21
25
  # Returns the policy class for the current resource (if the inferred class exists).
22
26
  #
23
27
  # If the operation name is +API::V1::Post::Operation::Show+, returns
24
28
  # +API::V1::Post::Policy+.
29
+ #
30
+ # @return [Class]
25
31
  def policy_klass
26
- super || (computed_policy_klass if class_exists?(computed_policy_klass))
32
+ super || (
33
+ Object.const_get(computed_policy_klass) if class_exists?(computed_policy_klass)
34
+ )
27
35
  end
28
36
 
29
37
  # Returns the contract class for the current resource (if the inferred class exists).
30
38
  #
31
39
  # If the operation name is +API::V1::Post::Operation::Create+, returns
32
40
  # +API::V1::Post::Contract::Create+.
41
+ #
42
+ # @return [Class]
33
43
  def contract_klass
34
- super || (computed_contract_klass if class_exists?(computed_contract_klass))
44
+ super || (
45
+ Object.const_get(computed_contract_klass) if class_exists?(computed_contract_klass)
46
+ )
35
47
  end
36
48
 
37
49
  # Returns the model class for the current resource (if the inferred class exists).
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Pragma
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-29 00:00:00.000000000 Z
11
+ date: 2016-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pragma-operation