Sha256: 1904bce77154c3c95ad2e3b313d37e18332d07c69f97ed7236491bb6b9701bda
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
require "virtus" module Docktor class Container include Virtus.value_object OPTION_ATTRIBUTES = %i(volumes ports links environment) values do attribute :name, String attribute :image, String attribute :command, String attribute :volumes, Array[String] attribute :ports, Array[String] attribute :links, Array[String] attribute :environment, Hash[String, String] end def options attributes.select { |key, value| (key != :name || key != :image) && !value.nil? && !value.empty? } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
docktor-0.1.0 | lib/docktor/container.rb |