Sha256: 9e3e54e99275cc99632716d7577ad9eda825def224a57e0a1b0d62d699103d30
Contents?: true
Size: 495 Bytes
Versions: 24
Compression:
Stored size: 495 Bytes
Contents
class Rad::Router::SimpleRouter inject logger: :logger def encode klass, method, params path = "/#{klass.name.underscore}/#{method}" return path, params end def decode path, params parts = path[1..-1].split '/' if parts.size >= 2 method = parts.pop.to_sym class_path = parts.join('/') class_name = class_path.camelize klass = class_name.constantize return klass, method, params end end end
Version data entries
24 entries across 24 versions & 1 rubygems