Module: Filander

Includes:
Chown, Cmd, CopyDirectory, CopyFile, CreateFile, EmptyDirectory, InjectIntoFile, Inside, 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/create_file.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, InjectIntoFile, Inside, 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 Inside

#inside

Methods included from InjectIntoFile

#inject_into_file

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.



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

def behavior
  @behavior
end

.destination_root_stackObject (readonly)

Returns the value of attribute destination_root_stack.



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

def destination_root_stack
  @destination_root_stack
end

.quietObject

Returns the value of attribute quiet.



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

def quiet
  @quiet
end

.source_root_stackObject (readonly)

Returns the value of attribute source_root_stack.



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

def source_root_stack
  @source_root_stack
end

.verboseObject

Returns the value of attribute verbose.



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

def verbose
  @verbose
end

Class Method Details

.destination_rootObject



63
64
65
66
# File 'lib/filander.rb', line 63

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

.destination_root=(dirname) ⇒ Object



59
60
61
# File 'lib/filander.rb', line 59

def destination_root=(dirname)
  add_destination_root dirname
end

.included(base) ⇒ Object



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

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

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

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

.source_rootObject



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

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

.source_root=(dirname) ⇒ Object



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

def source_root=(dirname)
  add_source_root dirname
end