base64_string 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/base64_string.rb +1 -1
- data/lib/base64_string/version.rb +1 -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: 6d612a12694979e8aefe33606711c6f27a0d41c9
|
4
|
+
data.tar.gz: 4634b63793ea1093378ec8ff4c1afcd2e332a8aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b28829467328cbffe1efb0d428e30df492ec19d4bb4c259d810947b1e9411fc1adebfaf05aa120a7a2b61a62926155a060e6573acb1c6684e69d078323f53a5
|
7
|
+
data.tar.gz: 7351cb270a8cf81a011ab793f3d31466a6dd663b7b1180f08cc9c5fff4dc65a7a37d7c911d58f79ac92867fe148db49ca202d5f5976fb77be93509dcba024cb7
|
data/README.md
CHANGED
@@ -21,17 +21,29 @@ Or install it yourself as:
|
|
21
21
|
```ruby
|
22
22
|
"hello world".encode64 # => "aGVsbG8gd29ybGQ=\n"
|
23
23
|
"aGVsbG8gd29ybGQ=\n".decode64 # => "hello world"
|
24
|
+
|
25
|
+
s = "hello world"
|
26
|
+
s.encode64
|
27
|
+
s # => "hello world"
|
28
|
+
s.encode64!
|
29
|
+
s # => "aGVsbG8gd29ybGQ=\n"
|
24
30
|
```
|
25
31
|
|
26
32
|
Adds all the same methods that [Base64](http://ruby-doc.org/stdlib-2.1.1/libdoc/base64/rdoc/Base64.html) class has:
|
27
33
|
|
28
34
|
```
|
29
35
|
decode64
|
36
|
+
decode64!
|
30
37
|
encode64
|
38
|
+
encode64!
|
31
39
|
strict_decode64
|
40
|
+
strict_decode64!
|
32
41
|
strict_encode64
|
42
|
+
strict_encode64!
|
33
43
|
urlsafe_decode64
|
44
|
+
urlsafe_decode64!
|
34
45
|
urlsafe_encode64
|
46
|
+
urlsafe_encode64!
|
35
47
|
```
|
36
48
|
|
37
49
|
The only difference is that Base64's methods take an argument. The String version of the method will pass itself as the argment when it calls the Base64 method.
|
data/lib/base64_string.rb
CHANGED