class FigNewton::Commands::Pull

Attributes

config[RW]
stack_name[RW]

Public Class Methods

new(stack_name, app, config_dir) click to toggle source
# File lib/fig-newton/commands/pull.rb, line 6
def initialize(stack_name, app, config_dir)
  @stack_name = stack_name
  @app = app
  @config = FigNewton::Config.from_file(config_dir, @stack_name)
end

Public Instance Methods

run(parent_directory) click to toggle source
# File lib/fig-newton/commands/pull.rb, line 12
def run(parent_directory)
  if @app
    config.apps[@app].pull(parent_directory)
  else
    config.apps.each { |_, app| app.pull(parent_directory) }
  end
end