class Moi [1] pry(main)* def []=(key,value) [1] pry(main)* p key, value [1] pry(main)* end [1] pry(main)* end => :[]= [2] pry(main)> Moi.new["foo"] = "bar" "foo" "bar" => "bar" [3] pry(main)>