Sha256: c984a0f6c9ec66f8695e4341efcbc566d40154aa2ec09e10c0b21c7592fa605c

Contents?: true

Size: 693 Bytes

Versions: 8

Compression:

Stored size: 693 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 = [:mac, :linux, :windows]
    @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

8 entries across 8 versions & 1 rubygems

Version Path
pantograph-0.1.22 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.21 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.20 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.19 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.17 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.16 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.15 pantograph/lib/pantograph/supported_platforms.rb
pantograph-0.1.14 pantograph/lib/pantograph/supported_platforms.rb