Joined February 2012
·

Luke Carrier

Software developer at The Development Manager
·
Worcestershire, England
·
·
·

To keep your array definition tidier and avoid odd spacing, you might go for something like this:

%w[/foo/bar /baz/bat /blah].each { |dir| directory dir }

If you need to specify attributes, using the longer block syntax is preferred:

%w[/foo/bar /baz/bat /blah].each do |dir|
    directory dir do
        owner 'foo'
    end
}
Achievements
253 Karma
20,426 Total ProTip Views