Commits

Steven! Ragnarök committed eebcdfa

A hopelessly egocentric null object.

Comments (0)

Files changed (1)

+# A hopelessly egocentric object.
+class NullObject
+  attr_reader :call_chain
+  def initialize
+    @call_chain = [:new]
+  end
+
+  def method_missing method_name, *args, &block
+    @call_chain << [method_name, args, block]
+  end
+
+  def respond_to? method_name
+    true
+  end
+end