class MenuMaker::Path::Converter::ArrayConverter

Public Class Methods

convert(path) click to toggle source
# File lib/menu_maker/path.rb, line 41
def self.convert(path)
  has_method = proc { |el| Path.valid_method? el }

  method = path.find(&has_method) || :get
  path   = path.delete_if(&has_method).first

  Path.new method, path
end