Permalink
Browse files

moved BasicObject into Fancy namespace

  • Loading branch information...
1 parent 36066f6 commit 889ce98775b604fbb9f60f1ee7caf729a7db885a @bakkdoor committed Feb 28, 2012
Showing with 11 additions and 9 deletions.
  1. +5 −3 boot/fancy_ext/object.rb
  2. +3 −3 lib/dynamic_slot_object.fy
  3. +1 −1 lib/message_sink.fy
  4. +2 −2 lib/proxy.fy
View
@@ -41,8 +41,10 @@ def protected
end
end
-class BasicObject
- instance_methods.each do |m|
- undef_method(m) if m.to_s !~ /(?:^__|^nil?$|^send$|^object_id$)/
+class Fancy
+ class BasicObject
+ instance_methods.each do |m|
+ undef_method(m) if m.to_s !~ /(?:^__|^nil?$|^send$|^object_id$)/
+ end
end
end
@@ -1,4 +1,4 @@
-class DynamicSlotObject : BasicObject {
+class DynamicSlotObject : Fancy BasicObject {
def initialize {
@object = Object new
}
@@ -14,7 +14,7 @@ class DynamicSlotObject : BasicObject {
}
}
-class DynamicKeyHash : BasicObject {
+class DynamicKeyHash : Fancy BasicObject {
def initialize: @deep (false) {
@hash = <[]>
}
@@ -36,7 +36,7 @@ class DynamicKeyHash : BasicObject {
}
}
-class DynamicValueArray : BasicObject {
+class DynamicValueArray : Fancy BasicObject {
def initialize {
@arr = []
}
View
@@ -1,5 +1,5 @@
class Fancy {
- class MessageSink : BasicObject {
+ class MessageSink : Fancy BasicObject {
"""
A MessageSink just swallows all messages that are sent to it.
"""
View
@@ -1,4 +1,4 @@
-class ProxyReceiver : BasicObject {
+class ProxyReceiver : Fancy BasicObject {
"""
A ProxyReceiver is an object which proxies all message sends to it to 2 other objects.
It will send each message first to its @proxy instance variable and then to the @obj instance variable.
@@ -30,7 +30,7 @@ class ProxyReceiver : BasicObject {
Proxy = ProxyReceiver
-class RespondsToProxy : BasicObject {
+class RespondsToProxy : Fancy BasicObject {
"""
A RespondsToProxy is a Proxy that forwards any message sent to it to it's @target instance variable
only if it responds to that message. Any messages that @target doesn't respond to simply won't be sent

0 comments on commit 889ce98

Please sign in to comment.