Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

readme

  • Loading branch information...
commit 828855f161d69f7f977cba23029d165cd49aa0a0 1 parent aa94a2a
@coderrr authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 README.markdown
View
14 README.markdown
@@ -8,7 +8,7 @@ I actually successfully wrapped all of Rails in a context. This shit actually w
Usage
=
- Protect.wrap_with_context :lib1 do
+ MonkeyShield.wrap_with_context :lib1 do
class Object
def to_xml
"<lib1/>"
@@ -22,7 +22,7 @@ Usage
end
end
- Protect.wrap_with_context :lib2 do
+ MonkeyShield.wrap_with_context :lib2 do
class Object
def to_xml
"<lib2/>"
@@ -38,12 +38,12 @@ Usage
# or
- Protect.wrap_with_context(:lib1) { require 'lib1' }
- Protect.wrap_with_context(:lib2) { require 'lib2' }
+ MonkeyShield.wrap_with_context(:lib1) { require 'lib1' }
+ MonkeyShield.wrap_with_context(:lib2) { require 'lib2' }
# now you can...
- Protect.context_switch_for Object, :to_xml
+ MonkeyShield.context_switch_for Object, :to_xml
o = Object.new
Lib1.xml_for o # => "<lib1/>"
@@ -51,9 +51,9 @@ Usage
o.to_xml # => raises Protect::NoContextError
- Protect.in_context(:lib2) { o.to_xml } # => "<lib2/>
+ MonkeyShield.in_context(:lib2) { o.to_xml } # => "<lib2/>
- Protect.set_default_context_for Object, :to_xml, :lib1
+ MonkeyShield.set_default_context_for Object, :to_xml, :lib1
o.to_xml => "<lib1/>"
Please sign in to comment.
Something went wrong with that request. Please try again.