lib/facet/hash/at.rb in facets-0.9.0 vs lib/facet/hash/at.rb in facets-1.0.0
- old
+ new
@@ -1,25 +1,50 @@
-require 'nano/hash/at.rb'
\ No newline at end of file
+class Hash
+ alias_method( :at, :[] )
+end
+
+
+# _____ _
+# |_ _|__ ___| |_
+# | |/ _ \/ __| __|
+# | | __/\__ \ |_
+# |_|\___||___/\__|
+#
+=begin test
+
+ require 'test/unit'
+
+ class TCHash < Test::Unit::TestCase
+
+ def test_at
+ h = { :a=>1, :b=>2 }
+ assert_equal( 1, h.at(:a) )
+ assert_equal( 2, h.at(:b) )
+ end
+
+ end
+
+=end