Class: Juggle::Op::File

Inherits:
Base
  • Object
show all
Defined in:
lib/juggle/ops/file.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#env, #opts

Instance Method Summary collapse

Methods inherited from Base

default_opts, #initialize

Constructor Details

This class inherits a constructor from Juggle::Op::Base

Instance Attribute Details

#globObject

Returns the value of attribute glob.



5
6
7
# File 'lib/juggle/ops/file.rb', line 5

def glob
  @glob
end

Instance Method Details

#make(glob) ⇒ Object



7
8
9
# File 'lib/juggle/ops/file.rb', line 7

def make(glob)
  self.glob = glob
end

#manifestObject



17
18
19
# File 'lib/juggle/ops/file.rb', line 17

def manifest
  Dir[glob].map {|f| ::File.expand_path(f)}
end

#renderObject



11
12
13
14
15
# File 'lib/juggle/ops/file.rb', line 11

def render
  Dir[glob].map {|path|
    ::File.read(path)
  }.join("\n")
end