I’m really new to Ruby. Got this error:
def initialize puts "going to "[email protected] end
class MainPage < Page
@url = “Main”
class LoginPage < Page
@url = “Login”
every time a page is created, I want it to go to its own url.
m = MainPage.new()
should print going to Main
l = LoginPage.new()
should print going to Login
But I tried @@, @ and found neither of them works.
Anyone knows what kind of method or variable I could use?