How do you Pass Variables Correctly in Ruby?

I’m trying to pass the modified “text_color” variable by dong:

def page_text(type, source = @title)
text_color = type + “_blue_text”
@title.text_color
end

With that, I’m getting an undefined method for “text_color”.

How would you do that correctly?

nevermind, just solved it :slight_smile:

def page_text(type, source = @title)
text_color = type + “_blue_text”
source.send(text_color)
end