class Producer::Core::Actions::Mkdir

Public Instance Methods

apply() click to toggle source
# File lib/producer/core/actions/mkdir.rb, line 15
def apply
  @path.descend do |path|
    next if fs.dir? path
    fs.mkdir path.to_s
    fs.setstat path.to_s, options unless options.empty?
  end
end
name() click to toggle source
# File lib/producer/core/actions/mkdir.rb, line 11
def name
  'mkdir'
end
setup() click to toggle source
# File lib/producer/core/actions/mkdir.rb, line 5
def setup
  check_arguments_size! 1
  @path = Pathname.new(arguments.first)
  convert_options mode: :permissions, user: :owner
end