Class: Net::SocketUri

Inherits:
Object
  • Object
show all
Defined in:
lib/cangrejo/net/socket_uri.rb

Instance Method Summary collapse

Constructor Details

#initialize(_socket_path, _path) ⇒ SocketUri

Returns a new instance of SocketUri.



4
5
6
7
# File 'lib/cangrejo/net/socket_uri.rb', line 4

def initialize(_socket_path, _path)
  @socket_path = _socket_path[7..-1]
  @path = _path
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/cangrejo/net/socket_uri.rb', line 21

def empty?
  false
end

#hostObject



13
14
15
# File 'lib/cangrejo/net/socket_uri.rb', line 13

def host
  @socket_path
end

#hostnameObject



9
10
11
# File 'lib/cangrejo/net/socket_uri.rb', line 9

def hostname
  @socket_path
end

#passwordObject



37
38
39
# File 'lib/cangrejo/net/socket_uri.rb', line 37

def password
  nil
end

#pathObject



29
30
31
# File 'lib/cangrejo/net/socket_uri.rb', line 29

def path
  @path
end

#portObject



25
26
27
# File 'lib/cangrejo/net/socket_uri.rb', line 25

def port
  nil
end

#request_uriObject



17
18
19
# File 'lib/cangrejo/net/socket_uri.rb', line 17

def request_uri
  @path
end

#to_sObject



41
42
43
# File 'lib/cangrejo/net/socket_uri.rb', line 41

def to_s
  "#{@socket_path}::@path"
end

#userObject



33
34
35
# File 'lib/cangrejo/net/socket_uri.rb', line 33

def user
  nil
end