naranya_ecm-sdk 0.0.41 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/naranya_ecm/rest/relation.rb +4 -4
- data/lib/naranya_ecm-sdk/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: edcb5360a556fa04739d34bda3fd6ae7e3f0a696
|
4
|
+
data.tar.gz: 6e2f6e3fe4f775b8e0df4a4c76c18299a5249740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 743f9b659c78a0b6c972092c032d81a0cd20e337ac2db8091ab4fbf57da82f731cc1f3932c27d279e1c4dd7c3e10e5d9790a841b68587523431c68b3342b884b
|
7
|
+
data.tar.gz: 8f1ef6a70618d0e6857ed2bbfe648c79cbece07e36268ab2a2eab8cfc87472e394e4ea0c3852be46ce92bed1f7f20ac028e7cf633644526fbb9f32fc26eb63b9
|
@@ -4,10 +4,10 @@ require 'naranya_ecm/rest/client'
|
|
4
4
|
module NaranyaEcm::Rest
|
5
5
|
class Relation
|
6
6
|
include Enumerable
|
7
|
-
delegate :to_yaml, :all?, :each, :first, :last, to: :to_a
|
7
|
+
delegate :to_yaml, :all?, :each, :first, :last, :to_ary, to: :to_a
|
8
8
|
|
9
9
|
attr_reader :klass, :conditions, :elements
|
10
|
-
|
10
|
+
|
11
11
|
def initialize(given_klass, given_conditions = {})
|
12
12
|
@klass, @conditions = given_klass, given_conditions.with_indifferent_access
|
13
13
|
end
|
@@ -33,7 +33,7 @@ module NaranyaEcm::Rest
|
|
33
33
|
def load(given_list)
|
34
34
|
# Revisar que todos los elementos sean Hash o la clase asociada:
|
35
35
|
if given_list.count > 0 && given_list.map{ |e| e.is_a?(Hash) || e.is_a?(@klass) }.reduce { |res, e| res && e } == false
|
36
|
-
raise "Type Mismatch: some elements are not a hash nor associated_class"
|
36
|
+
raise "Type Mismatch: some elements are not a hash nor associated_class"
|
37
37
|
end
|
38
38
|
|
39
39
|
@elements = given_list.map { |e| e.is_a?(Hash) ? @klass.load(e) : e }
|
@@ -49,4 +49,4 @@ module NaranyaEcm::Rest
|
|
49
49
|
end
|
50
50
|
|
51
51
|
end
|
52
|
-
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: naranya_ecm-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Quintanilla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|