Sha256: abfc96b54418aac35af6fa6187ec4aee044e67e05a82736761f9c96becd52a87

Contents?: true

Size: 700 Bytes

Versions: 9

Compression:

Stored size: 700 Bytes

Contents

module Pantograph
  class SupportedPlatforms
    class << self
      attr_accessor :extra
      attr_reader :default

      def extra=(value)
        value ||= []
        UI.important("Setting '#{value}' as extra SupportedPlatforms")
        @extra = value
      end
    end

    @default = [:ios, :mac, :android, :gradle]
    @extra = []

    def self.all
      (@default + @extra).flatten
    end

    # this will log a warning if the passed platform is not supported
    def self.verify!(platform)
      unless all.include?(platform.to_s.to_sym)
        UI.important("Platform '#{platform}' is not officially supported. Currently supported platforms are #{self.all}.")
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pantograph-0.1.13 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.12 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.10 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.8 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.7 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.6 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.4 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.3 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.1 pantograph/lib/pantograph/supported_platforms.rb