Wednesday, 21 August 2013

How do you stop/break a simple if statement?

How do you stop/break a simple if statement?

I want to stop or break my if statement. I know I can make another
statement that would cause it to stop. Is there a keyword I can't find?
if @filter
if @filter == "templates"
base_dir = "public/files/marketing"
@files = Dir.glob("#{base_dir}/voip/#{@filter}/*")
@view = "files"
This is where I want to break the if statement.
end
arrays_of_strings_to_check_against = ['logos', 'datasheets',
'buyers_guides', 'videos', 'web_banners', 'presentations', 'documents',
'press_releases', '3cx' ]
if @type ...

No comments:

Post a Comment