lib/roda/plugins/type_routing.rb
def on_type(type, &block)
          return unless type == requested_type
          response['Content-Type'] ||= @scope.opts[:type_routing][:types][type]
          always(&block)
        end
# Yields if the given +type+ matches the requested data type and halts
# the request afterwards, returning the result of the block.
Yields if the given +type+ matches the requested data type and halts
the request afterwards, returning the result of the block.
Yields if the given + type + matches the requested data type and halts the request afterwards returning the result of the block .
def on_type(type, &block)
          return unless type == requested_type
          response['Content-Type'] ||= @scope.opts[:type_routing][:types][type]
          always(&block)
        end
def on_type ( type , & block ) return unless type == requested_type response [ 'Content-Type' ] ||= @scope . opts [ :type_routing ] [ :types ] [ type ] always ( & block ) end
Yields if the given +type+ matches the requested data type and halts
the request afterwards, returning the result of the block.
Yields if the given + type + matches the requested data type and halts the request afterwards returning the result of the block .
type
block