conred 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +24 -1
- data/lib/conred/helpers.rb +4 -0
- data/lib/conred/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -18,7 +18,30 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Right now (version 0.0.4) has one text formating option and video helper.
|
22
|
+
For video you can use:
|
23
|
+
|
24
|
+
c = Conred::Video.new("http://www.youtube.com/watch?v=Lrj5Kxdzouc")
|
25
|
+
|
26
|
+
Then for embed code:
|
27
|
+
|
28
|
+
c.code
|
29
|
+
|
30
|
+
You can also check if it is youtube video or vimeo video like this:
|
31
|
+
|
32
|
+
c.youtube_video? ==> true
|
33
|
+
c.vimeo_video? ==> false
|
34
|
+
Currently video feature works with Youtube and Vimeo URL's
|
35
|
+
|
36
|
+
If you wish to use text helpers then in your application_helper add this include line:
|
37
|
+
|
38
|
+
include Conred::Helpers
|
39
|
+
|
40
|
+
Now you have method sanitize_and_trim available to you:
|
41
|
+
|
42
|
+
sanitize_and_trim("<html>string with", 10) => "string ..."
|
43
|
+
|
44
|
+
|
22
45
|
|
23
46
|
## Contributing
|
24
47
|
|
data/lib/conred/helpers.rb
CHANGED
data/lib/conred/version.rb
CHANGED