M
Mario Ruiz
I need that a method can be accesible only from other class but only
this method:
class Nueva
def metodo
puts 'metodo'
end
def metodo3
puts 'metodo3'
end
private
def metodo2
puts 'metodo2'
end
end
class Nueva2
def metodo
puts 'Nueva2metodo'
Nueva.new.metodo2()
end
def metodo2
puts 'Nueva2metodo2'
end
end
I need to call the Nueva.metodo2 from Nueva2.metodo and I want this
method can be accesible only from Nueva2 class. Also I don't want the
other methods from Nueva Class.
How can I do it???
Thank you in advance.
this method:
class Nueva
def metodo
puts 'metodo'
end
def metodo3
puts 'metodo3'
end
private
def metodo2
puts 'metodo2'
end
end
class Nueva2
def metodo
puts 'Nueva2metodo'
Nueva.new.metodo2()
end
def metodo2
puts 'Nueva2metodo2'
end
end
I need to call the Nueva.metodo2 from Nueva2.metodo and I want this
method can be accesible only from Nueva2 class. Also I don't want the
other methods from Nueva Class.
How can I do it???
Thank you in advance.