Sha256: 91267bccea65243d0b250611608a51396cd5f8773aabe1b4f3e07eccaf0d3c90

Contents?: true

Size: 611 Bytes

Versions: 7

Compression:

Stored size: 611 Bytes

Contents

module Oxidized
  class Model
    class Outputs
      def to_cfg
        type_to_str(nil)
      end

      def type_to_str(want_type)
        type(want_type).map { |out| out }.join
      end

      def <<(output)
        @outputs << output
      end

      def unshift(output)
        @outputs.unshift output
      end

      def all
        @outputs
      end

      def type(type)
        @outputs.select { |out| out.type == type }
      end

      def types
        @outputs.map { |out| out.type }.uniq.compact
      end

      private

      def initialize
        @outputs = []
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized/model/outputs.rb
oxidized-0.28.0 lib/oxidized/model/outputs.rb
oxidized-0.27.0 lib/oxidized/model/outputs.rb
oxidized-0.26.3 lib/oxidized/model/outputs.rb
oxidized-0.26.2 lib/oxidized/model/outputs.rb
oxidized-0.26.1 lib/oxidized/model/outputs.rb
oxidized-0.26.0 lib/oxidized/model/outputs.rb