Sha256: 5b38db56adbf0f97630fdb608f8ccb3f1280aacec32a3a9ea147c5e23a4194c5

Contents?: true

Size: 401 Bytes

Versions: 1

Compression:

Stored size: 401 Bytes

Contents

module Harbr
  class Host
    include Dddr::Entity
    attr_accessor :header,:container_uid,:port

    def to_s
      "#{port} -> #{header}"
    end
    
    queries do
      def find_by_header(header)
        all.find { |host| host.header == header }
      end

      def get_by_container(container)
        all.select { |host| host.container_uid == container.uid}
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
harbr-2.8.1 lib/harbr/host.rb