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