A
Aryk Grosz
Lets say I have
module A
class B
def t
puts "hi"
end
end
end
And I want to add a function to it. Whats the difference between:
module A
class B
def new_function
puts "foo"
end
end
end
***AND***
A::B.class_eval do
def new_function
puts "foo"
end
end
Is there any difference?
module A
class B
def t
puts "hi"
end
end
end
And I want to add a function to it. Whats the difference between:
module A
class B
def new_function
puts "foo"
end
end
end
***AND***
A::B.class_eval do
def new_function
puts "foo"
end
end
Is there any difference?