Class: Middleman::PreviewServer::ServerHostname

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-core/preview_server/server_hostname.rb

Defined Under Namespace

Classes: ServerFullHostname, ServerPlainHostname

Class Method Summary collapse

Class Method Details

.new(string) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/middleman-core/preview_server/server_hostname.rb', line 30

def self.new(string)
  @names = []
  @names << ServerPlainHostname
  @names << ServerFullHostname

  @names.find { |n| n.match? string }.new(string)
end