Method: Classifile::State#dir

Defined in:
lib/classifile/state.rb

#dir(dir_name, &block) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/classifile/state.rb', line 32

def dir(dir_name, &block)
  return if @gotcha

  child = make_child dir_name
  child_run!(child, block) do
    @gotcha = MoveFile.new(File.expand_path(@file.full_path),
                           File.expand_path(File.join(child.to_path, child.save_name)))
    sets_after_save_proc(child)
  end
end