Class: Request::Protocol

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/request/protocol.rb

Constant Summary collapse

ALL =
[]
INDEX =
ALL.each_with_object({}) do |protocol, index|
  index[protocol.name] = protocol
end.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#default_portFixnum (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return default port

Returns:

  • (Fixnum)


26
27
28
# File 'lib/request/protocol.rb', line 26

def default_port
  @default_port
end

#nameString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return name

Returns:

  • (String)


18
19
20
# File 'lib/request/protocol.rb', line 18

def name
  @name
end

Class Method Details

.get(name) ⇒ Protocol

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return protocol for name

Parameters:

  • name (String)

Returns:



42
43
44
# File 'lib/request/protocol.rb', line 42

def self.get(name)
  INDEX.fetch(name)
end