Class: Stitch::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/stitch/package.rb

Constant Summary collapse

DEFAULTS =
{
  :identifier   => "require",
  :paths        => [],
  :files        => [],
  :dependencies => []
}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Package

Returns a new instance of Package.



12
13
14
15
16
17
18
19
20
# File 'lib/stitch/package.rb', line 12

def initialize(options = {})
  options = DEFAULTS.merge(options)

  @identifier   = options[:identifier]
  @paths        = Array(options[:paths])
  @files        = Array(options[:files])
  @root         = options[:root]
  @dependencies = Array(options[:dependencies])
end

Instance Method Details

#compileObject



22
23
24
# File 'lib/stitch/package.rb', line 22

def compile
  [compile_dependencies, compile_sources].join("\n")
end