Module: Domrobot::Subdomain

Defined in:
lib/domrobot/subdomain.rb

Class Method Summary collapse

Class Method Details

.construct(elements) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/domrobot/subdomain.rb', line 4

def construct elements
  elements.collect do |element|
    uri = URI element
    case uri.scheme
    when "file"
      File.read(uri.path).strip
    else
      uri.path
    end
  end.join(".")
end