[ create a new paste ] login | about

Link: http://codepad.org/QGJepSv0    [ raw code | output | fork ]

Ruby, pasted on May 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
class Foo
  @foo = {
   'test' => {'test2' => 'test3'},
   'test4' => {'test5' => 'test6'},
  }

  def mymethod
    puts self.foo
  end
end

instance = Foo.new
instance.mymethod


Output:
1
2
Line 8:in `mymethod': undefined method `foo' for #<Foo:0xf75528d0> (NoMethodError)
	from t.rb:13


Create a new paste based on this one


Comments: