Class: Js::Preflight::Pack
- Inherits:
-
Object
- Object
- Js::Preflight::Pack
- Defined in:
- lib/js-preflight/pack.rb
Instance Attribute Summary collapse
-
#executable_path ⇒ Object
readonly
Returns the value of attribute executable_path.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filename, options = {}) ⇒ Pack
constructor
A new instance of Pack.
- #packed ⇒ Object
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, = {}) @filename = filename @executable_path = [:executable_path] || File.join(::Js::Preflight::Basedir, "bin") end |
Instance Attribute Details
#executable_path ⇒ Object (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 |
#filename ⇒ Object (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
#packed ⇒ Object
10 11 12 |
# File 'lib/js-preflight/pack.rb', line 10 def packed @pack ||= pack end |