# File lib/openshift-origin-node/model/cartridge.rb, line 50 def initialize(manifest = {}) @name = manifest["Name"] # FIXME: remove after element is renamed to CartridgeShortName @namespace = manifest["Namespace"] @short_name = manifest["CartridgeShortName"] ||= manifest["Namespace"] @namespace.upcase! @short_name.upcase! @vendor = manifest['CartridgeVendor'] ||= "not_provided" @version = manifest['CartridgeVersion'] endpoint_strings = manifest["Endpoints"] ||= [] @endpoints = Endpoint.parse_endpoints(@namespace, endpoint_strings) end
Convenience method which returns an array containing only those Endpoints which have a public_port_name specified.
# File lib/openshift-origin-node/model/cartridge.rb, line 68 def public_endpoints @endpoints.select {|e| e.public_port_name != nil} end