Class: MenuMaker::Path::Converter::ArrayConverter
- Inherits:
-
Object
- Object
- MenuMaker::Path::Converter::ArrayConverter
- Defined in:
- lib/menu_maker/path.rb
Class Method Summary collapse
Class Method Details
.convert(path) ⇒ Object
41 42 43 44 45 46 47 48 |
# 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 |