Skip to content

Commit 5fcc07b

Browse files
committed
Updates documentation
1 parent cf14fc7 commit 5fcc07b

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#### Features
44

55
* Your contribution here.
6-
* [#1802](https://github.com/ruby-grape/grape/pull/1802): Adds the ability to re-mount endpoints that inherit from RemountableAPI - [@myxoh](https://github.com/myxoh).
6+
* [#1795](https://github.com/ruby-grape/grape/pull/1803): Adds the ability to re-mount all endpoints in any location - [@myxoh](https://github.com/bschmeck).
77
* [#1795](https://github.com/ruby-grape/grape/pull/1795): Fix vendor/subtype parsing of an invalid Accept header - [@bschmeck](https://github.com/bschmeck).
88
* [#1791](https://github.com/ruby-grape/grape/pull/1791): Support `summary`, `hidden`, `deprecated`, `is_array`, `nickname`, `produces`, `consumes`, `tags` options in `desc` block - [@darren987469](https://github.com/darren987469).
99

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ end
370370

371371
## Remounting
372372

373-
You can mount the same endpoints in two different locations using `RemountableAPI`
373+
You can mount the same endpoints in two different locations
374374

375375
```ruby
376-
class Voting::API < Grape::RemountableAPI
376+
class Voting::API < Grape::GrapeAPI
377377
namespace 'votes' do
378378
get do
379379
# Your logic
@@ -403,7 +403,7 @@ You can configure remountable endpoints for small details changing according to
403403
they are mounted
404404

405405
```ruby
406-
class Voting::API < Grape::RemountableAPI
406+
class Voting::API < Grape::API
407407
namespace 'votes' do
408408
desc "Vote for your #{configuration[:votable]}"
409409
get do

lib/grape/api.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require 'grape/router'
22

33
module Grape
4-
# The RemountableAPI class can replace most API classes, except for the base one that is to be mounted in rack.
4+
# The API class is the primary entry point for creating Grape APIs. Users
55
# should subclass this class in order to build an API.
66
class API
7-
# Class methods that we want to call on the RemountableAPI rather than on the API object
7+
# Class methods that we want to call on the API rather than on the API object
88
NON_OVERRIDABLE = %I[define_singleton_method instance_variable_set inspect class is_a? ! kind_of? respond_to? byebug].freeze
99

1010
class << self
@@ -35,7 +35,7 @@ def override_all_methods
3535
end
3636
end
3737

38-
# When classes inheriting from this RemountableAPI child, we also want the instances to inherit from our instance
38+
# When classes inheriting from this API child, we also want the instances to inherit from our instance
3939
def make_inheritable
4040
define_singleton_method(:inherited) do |sub_remountable|
4141
Grape::API.inherited(sub_remountable, base_instance)

lib/grape/api_instance.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require 'grape/router'
22

33
module Grape
4-
# The API class is the primary entry point for creating Grape APIs. Users
5-
# should subclass this class in order to build an API.
4+
# The API Instance class, is the engine behind Grape::API. Each class that inherits
5+
# from this will represent a different API
66
class APIInstance
77
include Grape::DSL::API
88

0 commit comments

Comments
 (0)