Class: Tuttle::Presenters::RackMiniProfiler::ClientSettings
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Tuttle::Presenters::RackMiniProfiler::ClientSettings
- Defined in:
- lib/tuttle/presenters/rack_mini_profiler/client_settings.rb
Instance Method Summary collapse
-
#initialize(env) ⇒ ClientSettings
constructor
A new instance of ClientSettings.
- #tuttle_check_cookie ⇒ Object
- #tuttle_check_cookie_method ⇒ Object
- #version_10? ⇒ Boolean
Constructor Details
#initialize(env) ⇒ ClientSettings
Returns a new instance of ClientSettings.
7 8 9 10 11 |
# File 'lib/tuttle/presenters/rack_mini_profiler/client_settings.rb', line 7 def initialize(env) rmp_cs_args = [env] rmp_cs_args += [::Rack::MiniProfiler.config.storage_instance, Time.current] if version_10? super(::Rack::MiniProfiler::ClientSettings.new(*rmp_cs_args)) end |
Instance Method Details
#tuttle_check_cookie ⇒ Object
17 18 19 |
# File 'lib/tuttle/presenters/rack_mini_profiler/client_settings.rb', line 17 def version_10? ? : end |
#tuttle_check_cookie_method ⇒ Object
21 22 23 |
# File 'lib/tuttle/presenters/rack_mini_profiler/client_settings.rb', line 21 def version_10? ? 'has_valid_cookie?' : 'has_cookie?' end |
#version_10? ⇒ Boolean
13 14 15 |
# File 'lib/tuttle/presenters/rack_mini_profiler/client_settings.rb', line 13 def version_10? Rack::MiniProfiler::ClientSettings.instance_method(:initialize).arity > 1 end |