ruby-zoom 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zoom.rb +1 -1
- data/lib/zoom/profile.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dcc3f7e09fe05c3ef29bf55a947d48ab6d0d1be
|
4
|
+
data.tar.gz: 3cb6fd45e77af7d96c54f75f9452a1b57789dbac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 266f3791b25e3b4728b37442359ec7187bc256c1d786ae5ef7080dc880648d4dcde929ba05206edbf7af49a3f34a1414f11462e9c11bc9723ec1d0f922661a02
|
7
|
+
data.tar.gz: e0d36866de0ecb6245e96d22fae3e637685b9e972bfbf7e0fa5b5f66fb0b97af374ee00ee6dd5cb8bdb82b3b82a859081e700440ea74d803979c941df44477ff
|
data/lib/zoom.rb
CHANGED
data/lib/zoom/profile.rb
CHANGED
@@ -27,7 +27,7 @@ class Zoom::Profile < Hash
|
|
27
27
|
|
28
28
|
def self.from_json(json)
|
29
29
|
begin
|
30
|
-
return
|
30
|
+
return profile_by_name(json["class"]).new(
|
31
31
|
json["operator"].nil? ? "" : json["operator"],
|
32
32
|
json["flags"].nil? ? "" : json["flags"],
|
33
33
|
json["prepend"].nil? ? "" : json["prepend"],
|
@@ -87,6 +87,12 @@ class Zoom::Profile < Hash
|
|
87
87
|
return self["prepend"]
|
88
88
|
end
|
89
89
|
|
90
|
+
def self.profile_by_name(clas)
|
91
|
+
clas.split("::").inject(Object) do |mod, class_name|
|
92
|
+
mod.const_get(class_name)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
90
96
|
def to_s
|
91
97
|
[
|
92
98
|
self.colors,
|