Method: Dalli::Protocol::ServerConfigParser.deconstruct_string

Defined in:
lib/dalli/protocol/server_config_parser.rb

.deconstruct_string(str) ⇒ Object

Raises:



53
54
55
56
57
58
# File 'lib/dalli/protocol/server_config_parser.rb', line 53

def self.deconstruct_string(str)
  mtch = str.match(SERVER_CONFIG_REGEXP)
  raise Dalli::DalliError, "Could not parse hostname #{str}" if mtch.nil? || mtch[1] == '[]'

  mtch
end