From 2df6080c5cb9807a428597356148a6cbfaec4458 Mon Sep 17 00:00:00 2001 From: Takle Date: Wed, 11 Jun 2014 13:06:31 +0100 Subject: [PATCH] Draft update of readme --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 614865a..bef7fd1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,20 @@ And remember to `bundle` ## Usage -This gem adds `String#embedda` to Ruby strings. You use it like this: +If you want to extend Ruby `String#embedda` add the following. + +```ruby +require 'embedda' + +class String + def embedda(options = {}) + Embedda.new(self, options).embed + end +end +``` + +Its best practice not to extend core objects and use the Embedda class itself. +Examples are written with the `String` extended. You use it like this: ```ruby "String heheh http://www.youtube.com/watch?v=BVtYSy83XXw yeah".embedda