Skip to content

Commit

Permalink
call extension methods directly on instance
Browse files Browse the repository at this point in the history
  • Loading branch information
dewski committed Feb 10, 2012
1 parent 9df9286 commit f5794c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/json_builder/extensions.rb
Expand Up @@ -2,25 +2,25 @@


class FalseClass class FalseClass
def to_builder def to_builder
self.inspect inspect
end end
end end


class TrueClass class TrueClass
def to_builder def to_builder
self.inspect inspect
end end
end end


class String class String
def to_builder def to_builder
self.inspect inspect
end end
end end


class Hash class Hash
def to_builder def to_builder
self.to_json to_json
end end
end end


Expand Down Expand Up @@ -51,7 +51,7 @@ def to_builder
module BSON module BSON
class ObjectId class ObjectId
def to_builder def to_builder
self.to_s.inspect to_s.inspect
end end
end end
end end

0 comments on commit f5794c0

Please sign in to comment.