Class: SproutPunk::Commands::Builds

Inherits:
Base
  • Object
show all
Defined in:
lib/sproutpunk/commands/builds.rb

Instance Method Summary collapse

Methods inherited from Base

command_set, #initialize

Methods included from Helpers

#_config

Constructor Details

This class inherits a constructor from SproutPunk::Commands::Base

Instance Method Details

#add(name, source) ⇒ Object



20
21
22
# File 'lib/sproutpunk/commands/builds.rb', line 20

def add(name, source)
  _manifest.send("#{name}=", source)
end

#compile(target) ⇒ Object



31
32
33
34
# File 'lib/sproutpunk/commands/builds.rb', line 31

def compile(target)
  build = SproutPunk::Builds::Build.new(target)
  build.execute
end

#listObject



9
10
11
12
13
14
15
16
17
# File 'lib/sproutpunk/commands/builds.rb', line 9

def list
  if !_config.builds || !_config.builds.directory || !_config.builds.manifest
    say "I don't know where to find your Actionscript files or the build manifest."
    say "Please run `fp setup`."
    exit
  end

  print_table _config.builds.to_hash, :ident => 2
end

#removeObject



26
27
28
# File 'lib/sproutpunk/commands/builds.rb', line 26

def remove
  _manifest.delete(name)
end