Class: Hurley::SocketBinding

Inherits:
Struct
  • Object
show all
Defined in:
lib/hurley/options.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



143
144
145
# File 'lib/hurley/options.rb', line 143

def host
  @host
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



143
144
145
# File 'lib/hurley/options.rb', line 143

def port
  @port
end

Class Method Details

.parse(bind) ⇒ Object



144
145
146
147
148
# File 'lib/hurley/options.rb', line 144

def self.parse(bind)
  h, p = bind.to_s.split(":", 2)
  p = p.to_i
  new(h, p.zero? ? nil : p)
end