class EacLauncher::Runner::Publish

Constants

DOC

Public Instance Methods

run() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 25
def run
  ::EacLauncher::Context.current.recache = options['--recache']
  build_publish_options
  instances.each do |i|
    next unless i.options.publishable?

    i.send(instance_method)
  end
end

Private Instance Methods

build_publish_options() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 45
def build_publish_options
  ::EacLauncher::Context.current.publish_options = publish_options
end
dry_run?() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 37
def dry_run?
  options.fetch('--dry-run')
end
instance_method() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 41
def instance_method
  run? || dry_run? ? 'publish_run' : 'publish_check'
end
publish_options() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 49
def publish_options
  { new: options.fetch('--new'), stereotype: options.fetch('--stereotype'),
    confirm: run? }
end
run?() click to toggle source
# File lib/eac_launcher/runner/publish.rb, line 54
def run?
  options.fetch('--run') && !dry_run?
end