lib/grape/router/route.rb in grape-1.3.2 vs lib/grape/router/route.rb in grape-1.3.3
- old
+ new
@@ -16,10 +16,11 @@
alias attributes translator
extend Forwardable
def_delegators :pattern, :path, :origin
+ delegate Grape::Router::AttributeTranslator::ROUTE_ATTRIBUTES => :attributes
def method_missing(method_id, *arguments)
match = ROUTE_ATTRIBUTE_REGEXP.match(method_id.to_s)
if match
method_name = match.captures.last.to_sym
@@ -30,28 +31,9 @@
end
end
def respond_to_missing?(method_id, _)
ROUTE_ATTRIBUTE_REGEXP.match?(method_id.to_s)
- end
-
- %i[
- prefix
- version
- settings
- format
- description
- http_codes
- headers
- entity
- details
- requirements
- request_method
- namespace
- ].each do |method_name|
- define_method method_name do
- attributes.public_send method_name
- end
end
def route_method
warn_route_methods(:method, caller(1).shift, :request_method)
request_method