Sha256: de088e79339a138457a31caab4df2bf3e312c8d7ac25fb983f1037d11fed937d

Contents?: true

Size: 607 Bytes

Versions: 5

Compression:

Stored size: 607 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

5 entries across 5 versions & 1 rubygems

Version Path
oxidized-0.25.1 lib/oxidized/model/outputs.rb
oxidized-0.25.0 lib/oxidized/model/outputs.rb
oxidized-0.24.0 lib/oxidized/model/outputs.rb
oxidized-0.23.0 lib/oxidized/model/outputs.rb
oxidized-0.22.0 lib/oxidized/model/outputs.rb