class Croesus::RouteDSL
Public Class Methods
new(verb, path, &block)
click to toggle source
# File lib/croesus/dsl/route_dsl.rb, line 27 def initialize(verb, path, &block) instance_eval(&block) @name ||= name @verb = verb @path = path @input ||= nil @returns ||= nil @description ||= description end
Public Instance Methods
to_hash()
click to toggle source
# File lib/croesus/dsl/route_dsl.rb, line 37 def to_hash { name: @name, verb: @verb, path: @path, input: @input, returns: @returns, description: @description } end