zencoder 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zencoder/version.rb +1 -1
- data/lib/zencoder/zencoder.rb +5 -5
- metadata +3 -3
data/lib/zencoder/version.rb
CHANGED
data/lib/zencoder/zencoder.rb
CHANGED
@@ -5,21 +5,21 @@ class Zencoder
|
|
5
5
|
|
6
6
|
self.base_url = 'https://app.zencoder.com/api'
|
7
7
|
|
8
|
-
def self.encode(content, format)
|
8
|
+
def self.encode(content, format=nil)
|
9
9
|
if content.is_a?(String)
|
10
10
|
content
|
11
11
|
elsif format.to_s == 'xml'
|
12
12
|
content.to_xml
|
13
|
-
|
13
|
+
else
|
14
14
|
content.to_json
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
def encode(content, format)
|
18
|
+
def encode(content, format=nil)
|
19
19
|
self.class.encode(content, format)
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.decode(content, format)
|
22
|
+
def self.decode(content, format=nil)
|
23
23
|
if content.is_a?(String)
|
24
24
|
if format.to_s == 'xml'
|
25
25
|
Hash.from_xml(content)
|
@@ -31,7 +31,7 @@ class Zencoder
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
def decode(content, format)
|
34
|
+
def decode(content, format=nil)
|
35
35
|
self.class.decode(content, format)
|
36
36
|
end
|
37
37
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 2.1.
|
8
|
+
- 4
|
9
|
+
version: 2.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nathan Sutton
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-07 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|