Sha256: e4e1785ed119c1cca6ece2f48d0087dd533074ac660a3a0b51830e39398e160a

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

module Vx
  module Builder
    class BuildConfiguration
      class Artifacts

        attr_reader :attributes

        def initialize(new_env)
          normalize_attributes(new_env)
        end

        def artifacts
          @attributes
        end

        private

          def normalize_attributes(new_env)

            @attributes =
              case new_env
              when Array
                new_env.map(&:to_s)
              else
                Array(new_env).map(&:to_s)
              end

            @attributes.map! do |attr|
              attr.gsub(/^\.*(\/)/, '')
            end

          end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vx-builder-0.1.1 lib/vx/builder/build_configuration/artifacts.rb
vx-builder-0.1.0 lib/vx/builder/build_configuration/artifacts.rb
vx-builder-0.0.29 lib/vx/builder/build_configuration/artifacts.rb