I have the following which works well:
def steps
%w[hello billing confirmation]
end
steps.first
But I want to do this:
def step_title
%w['Upload a photo' 'Billing Info' 'Confirmation Screen']
end
steps.first
How does %w allow for that? I tried a google search but google is weak with these types of characters.
Thanks
%wcreates an “array of words,” and uses whitespace to separate each value. Since you want to separate on another value (in this case, whitespace outside sets of quotation marks), just use a standard array: