Sha256: 12814896399ba53efefb421479e8fbf2d0b5526b732d082fd1d89203fc5cb18f
Contents?: true
Size: 581 Bytes
Versions: 2
Compression:
Stored size: 581 Bytes
Contents
module Praxis class Route attr_accessor :verb, :path, :version, :name, :prefixed_path, :options def initialize(verb, path, version='n/a', name:nil, prefixed_path:nil, **options) @verb = verb @path = path @version = version @name = name @options = options @prefixed_path = prefixed_path end def describe result = { verb: verb, path: path.to_s, version: version } result[:name] = name unless name.nil? result[:options] = options if options.any? result end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
praxis-0.17.1 | lib/praxis/route.rb |
praxis-0.17.0 | lib/praxis/route.rb |