class SomeClass
  def initialize
    @a = 1
    @b = 2
  end
  def mymeth
    #...
  end
  protected :mymeth
end

x = SomeClass.new

def x.newmeth
  # ...
end

iv = x.instance_variables # ["@b", "@a"]
p x.methods.size                # 42
p x.public_methods.size         # 41
p x.public_methods(false).size  #1
p x.private_methods.size        # 71
p x.private_methods(false).size #1
p x.protected_methods.size      #1
p x.singleton_methods.size      #1

