Module: Filander

Includes:
Chown, Cmd, CopyDirectory, CopyFile, CreateFile, EmptyDirectory, GitClone, InjectIntoFile, Inside, InstallGem, Template
Defined in:
lib/filander.rb,
lib/filander/actions/cmd.rb,
lib/filander/actions/base.rb,
lib/filander/actions/chown.rb,
lib/filander/actions/inside.rb,
lib/filander/actions/template.rb,
lib/filander/actions/copy_file.rb,
lib/filander/actions/git_clone.rb,
lib/filander/actions/create_file.rb,
lib/filander/actions/install_gem.rb,
lib/filander/actions/copy_directory.rb,
lib/filander/actions/empty_directory.rb,
lib/filander/actions/inject_into_file.rb

Defined Under Namespace

Modules: Base, Chown, Cmd, CopyDirectory, CopyFile, CreateFile, EmptyDirectory, GitClone, InjectIntoFile, Inside, InstallGem, Template

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Template

#template

Methods included from Base

#create_directory_for, #entries, #join_destination, #join_source, #report, #with_report

Methods included from InstallGem

#install_gem

Methods included from Inside

#inside

Methods included from InjectIntoFile

#inject_into_file

Methods included from GitClone

#git_clone

Methods included from EmptyDirectory

#empty_directory

Methods included from CreateFile

#create_file

Methods included from CopyFile

#copy_file

Methods included from CopyDirectory

#copy_directory

Methods included from Chown

#chown

Methods included from Cmd

#cmd

Class Attribute Details

.behaviorObject

Returns the value of attribute behavior.



40
41
42
# File 'lib/filander.rb', line 40

def behavior
  @behavior
end

.destination_root_stackObject (readonly)

Returns the value of attribute destination_root_stack.



39
40
41
# File 'lib/filander.rb', line 39

def destination_root_stack
  @destination_root_stack
end

.quietObject

Returns the value of attribute quiet.



40
41
42
# File 'lib/filander.rb', line 40

def quiet
  @quiet
end

.source_root_stackObject (readonly)

Returns the value of attribute source_root_stack.



39
40
41
# File 'lib/filander.rb', line 39

def source_root_stack
  @source_root_stack
end

Class Method Details

.destination_rootObject



55
56
57
58
# File 'lib/filander.rb', line 55

def destination_root
  @destination_root_stack ||= []
  @destination_root_stack.last
end

.destination_root=(dirname) ⇒ Object



51
52
53
# File 'lib/filander.rb', line 51

def destination_root=(dirname)
  add_destination_root dirname
end

.included(base) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/filander.rb', line 17

def self.included(base)
  base.class_eval do
    def self.source_root(dirname)
      Filander.source_root = dirname
    end

    def self.destination_root(dirname)
      Filander.destination_root = dirname
    end

    def self.quiet(value)
      Filander.quiet = value
    end

    # can be :pretend, :skip, :force
    def self.behavior(value)
      Filander.behavior = value
    end
  end
end

.source_rootObject



46
47
48
49
# File 'lib/filander.rb', line 46

def source_root
  @source_root_stack ||= []
  @source_root_stack.last
end

.source_root=(dirname) ⇒ Object



42
43
44
# File 'lib/filander.rb', line 42

def source_root=(dirname)
  add_source_root dirname
end