Class: Js::Preflight::Pack

Inherits:
Object
  • Object
show all
Defined in:
lib/js-preflight/pack.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, options = {}) ⇒ Pack

Returns a new instance of Pack.



5
6
7
8
# File 'lib/js-preflight/pack.rb', line 5

def initialize(filename, options = {})
  @filename = filename
  @executable_path = options[:executable_path] || File.join(::Js::Preflight::Basedir, "bin")
end

Instance Attribute Details

#executable_pathObject (readonly)

Returns the value of attribute executable_path.



4
5
6
# File 'lib/js-preflight/pack.rb', line 4

def executable_path
  @executable_path
end

#filenameObject (readonly)

Returns the value of attribute filename.



4
5
6
# File 'lib/js-preflight/pack.rb', line 4

def filename
  @filename
end

Class Method Details

.build(files) ⇒ Object



14
15
16
17
18
# File 'lib/js-preflight/pack.rb', line 14

def self.build(files)
  files.each do |file|
    yield Pack.new(file).packed
  end
end

Instance Method Details

#packedObject



10
11
12
# File 'lib/js-preflight/pack.rb', line 10

def packed
  @pack ||= pack
end