K
Karl-Heinz Wild
maybe a dummy question. sorry.
class Base
def theName
# the name i would like return should be "Question" mean the name of
the class
# calling this function
end
end
class Question < Base
def get( name )
File.open( theName, 'r' ).each { | line |
puts line
}
end
end
how can i get the name "Question" in a String. I need this as an
identifier.
thanks
Karl-Heinz
class Base
def theName
# the name i would like return should be "Question" mean the name of
the class
# calling this function
end
end
class Question < Base
def get( name )
File.open( theName, 'r' ).each { | line |
puts line
}
end
end
how can i get the name "Question" in a String. I need this as an
identifier.
thanks
Karl-Heinz