File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ def make_inheritable
47
47
# For instance, a descripcion could be done using: `desc configuration[:description]` if it may vary
48
48
# depending on where the endpoint is mounted. Use with care, if you find yourself using configuration
49
49
# too much, you may actually want to provide a new API rather than remount it.
50
- def mount_instance ( configuration : { } )
50
+ def mount_instance ( opts = { } )
51
51
instance = Class . new ( @base_parent )
52
- instance . instance_variable_set ( :@configuration , configuration )
52
+ instance . instance_variable_set ( :@configuration , opts [ : configuration] || { } )
53
53
instance . define_singleton_method ( :configuration ) { @configuration }
54
54
replay_setup_on ( instance )
55
55
@instances << instance
Original file line number Diff line number Diff line change @@ -77,11 +77,11 @@ def do_not_route_options!
77
77
namespace_inheritable ( :do_not_route_options , true )
78
78
end
79
79
80
- def mount ( mounts , with : { } )
80
+ def mount ( mounts , opts = { } )
81
81
mounts = { mounts => '/' } unless mounts . respond_to? ( :each_pair )
82
82
mounts . each_pair do |app , path |
83
83
if app . respond_to? ( :mount_instance )
84
- return mount ( app . mount_instance ( configuration : with ) => path )
84
+ return mount ( app . mount_instance ( configuration : opts [ : with] || { } ) => path )
85
85
end
86
86
in_setting = inheritable_setting
87
87
You can’t perform that action at this time.
0 commit comments