Module: Upkey::Helios::Builder

Defined in:
lib/upkey/helios/builder.rb

Class Method Summary collapse

Class Method Details

.path(path_info_array) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/upkey/helios/builder.rb', line 4

def self.path(path_info_array)
  path_str = "/api"

  path_info_array.each do |section|
    if section.values[0].nil?
      path_str += "/#{section.keys[0]}"
    else
      path_str += "/#{section.keys[0]}/#{section.values[0]}"
    end
  end

  path_str
end