Sha256: c3b33636b5e9169ece8007984d441fdb90679d575e83fd0c40b544610371fc43

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

module Pod
  class Command
    class Playgrounds < Command
      self.summary = 'Generates a Swift Playground for any Pod.'

      self.description = <<-DESC
        Generates a Swift Playground for any Pod.
      DESC

      self.arguments = [CLAide::Argument.new('NAMES', true)]

      def initialize(argv)
        arg = argv.shift_argument
        @names = arg.split(',') if arg
        super
      end

      def validate!
        super
        help! 'At least one Pod name is required.' unless @names
      end

      def run
        # TODO: Pass platform and deployment target from configuration
        generator = WorkspaceGenerator.new(@names)
        generator.generate
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-playgrounds-1.0.0 lib/cocoapods-playgrounds/command/playgrounds.rb
cocoapods-playgrounds-0.1.0 lib/cocoapods-playgrounds/command/playgrounds.rb
cocoapods-playgrounds-0.0.3 lib/cocoapods-playgrounds/command/playgrounds.rb