module Pleiades::Command::Routing::PathBuilder

Public Instance Methods

normalize_path(scope = nil, action = nil) click to toggle source
# File lib/pleiades/core/command/routing/path_builder.rb, line 6
def normalize_path(scope = nil, action = nil)
  dirs = []

  dirs << @options[:scope] if @options[:scope].any?
  dirs << scope if scope
  dirs << (action || @options[:action])

  dirs.join('/')
end