Sha256: bf8dda963034802979cec25279ed647f8a1b07eae06481ce127c96f9813f9a10

Contents?: true

Size: 582 Bytes

Versions: 18

Compression:

Stored size: 582 Bytes

Contents

require "flipper/adapters/memory"

module Flipper
  class Export
    attr_reader :contents, :format, :version

    def initialize(contents:, format: :json, version: 1)
      @contents = contents
      @format = format
      @version = version
    end

    def features
      raise NotImplementedError
    end

    def adapter
      @adapter ||= Flipper::Adapters::Memory.new(features)
    end

    def eql?(other)
      self.class.eql?(other.class) && @contents == other.contents && @format == other.format && @version == other.version
    end
    alias_method :==, :eql?
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
flipper-1.3.2 lib/flipper/export.rb
flipper-1.3.1 lib/flipper/export.rb
flipper-1.3.0 lib/flipper/export.rb
flipper-1.3.0.pre lib/flipper/export.rb
flipper-1.2.2 lib/flipper/export.rb
flipper-1.2.1 lib/flipper/export.rb
flipper-1.2.0 lib/flipper/export.rb
flipper-1.1.2 lib/flipper/export.rb
flipper-1.1.1 lib/flipper/export.rb
flipper-1.1.0 lib/flipper/export.rb
flipper-1.0.0 lib/flipper/export.rb
flipper-1.0.0.pre lib/flipper/export.rb
flipper-0.28.3 lib/flipper/export.rb
flipper-0.28.2 lib/flipper/export.rb
flipper-0.28.1 lib/flipper/export.rb
flipper-0.28.0 lib/flipper/export.rb
flipper-0.27.1 lib/flipper/export.rb
flipper-0.27.0 lib/flipper/export.rb