Method: FSSM::Path#initialize

Defined in:
lib/fssm/path.rb

#initialize(path = nil, glob = nil, options = {}, &block) ⇒ Path

Returns a new instance of Path.



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/fssm/path.rb', line 2

def initialize(path=nil, glob=nil, options={}, &block)
  @options = options
  set_path(path || '.')
  set_glob(glob || '**/*')
  init_callbacks

  if block_given?
    if block.arity == 1
      block.call(self)
    else
      self.instance_eval(&block)
    end
  end
end