[Solved] Self Keyword in ruby [closed]


Call the method. If you get a NoMethodError: undefined method it actually isn’t defined. If it runs, then it is defined. It could be that it is defined in an external package the project uses, and not in the actual codebase.

Also you can shorten it like this:

def is_fdi?
 !!get_fed_state[/fdi/i]
end

solved Self Keyword in ruby [closed]