Skip to content

Commit

Permalink
fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
dsh0416 committed Feb 9, 2024
1 parent 12af2ed commit 85b5f97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 13 additions & 0 deletions lib/inori/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ def class_initialize
nil
end

# Add M-SEARCH method as a DSL for route definition
# @param [ String ] path Accepts as part of path in route definition
# @yield what to run when route matched
# @return [ nil ] nil
# @example String as router
# msearch '/' do
# puts 'Hello World'
# end
def msearch(path, &block)
# Most of the routes has been added in `Inori::APIRoutes`, but not this one
add_route(:'M-SEARCH', path, block)
end

# Mount a route prefix with another API defined
# @param [String] prefix prefix of the route String
# @param [Class] api inherited from Inori::API
Expand Down
12 changes: 0 additions & 12 deletions lib/inori/api_routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,6 @@ def checkout(path, &block) end
# end
def merge(path, &block) end

# Add M-SEARCH method as a DSL for route definition
# @param [ String ] path Accepts as part of path in route definition
# @yield what to run when route matched
# @return [ nil ] nil
# @example String as router
# msearch '/' do
# puts 'Hello World'
# end
def msearch(path, &block)
add_route(:'M-SEARCH', path, block)
end

# Add NOTIFY method as a DSL for route definition
# @param [ String ] path Accepts as part of path in route definition
# @yield what to run when route matched
Expand Down

0 comments on commit 85b5f97

Please sign in to comment.