Sha256: 53cd63cee2a57175f3b4c79c7cde07a464e35f9839bd675c9e1cfcfe0c8eb232

Contents?: true

Size: 440 Bytes

Versions: 7

Compression:

Stored size: 440 Bytes

Contents

module Harbr
  class Container
    include Dddr::Entity
    attr_accessor :name, :host_header, :ip, :port,:current_version, :next_version,:previous_version

    queries do
      def find_by_header(host_header)
        all.find { |container| container.host_header.downcase == host_header.downcase }
      end

      def find_by_name(name)
        all.find { |container| container.name.downcase == name.downcase }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
harbr-0.0.107 lib/harbr/container.rb
harbr-0.0.106 lib/harbr/container.rb
harbr-0.0.105 lib/harbr/container.rb
harbr-0.0.104 lib/harbr/container.rb
harbr-0.0.103 lib/harbr/container.rb
harbr-0.0.101 lib/harbr/container.rb
harbr-0.0.100 lib/harbr/container.rb