lib/hanami/action/base_params.rb in hanami-controller-1.0.0.beta2 vs lib/hanami/action/base_params.rb in hanami-controller-1.0.0.beta3
- old
+ new
@@ -5,16 +5,18 @@
module Action
class BaseParams
# The key that returns raw input from the Rack env
#
# @since 0.7.0
+ # @api private
RACK_INPUT = 'rack.input'.freeze
# The key that returns router params from the Rack env
# This is a builtin integration for Hanami::Router
#
# @since 0.7.0
+ # @api private
ROUTER_PARAMS = 'router.params'.freeze
# The key that returns Rack session params from the Rack env
# Please note that this is used only when an action is unit tested.
#
@@ -44,9 +46,10 @@
# @param env [Hash] a Rack env or an hash of params.
#
# @return [Params]
#
# @since 0.7.0
+ # @api private
def initialize(env)
@env = env
@raw = _extract_params
@params = Utils::Hash.new(@raw).deep_dup.deep_symbolize!.to_h
freeze