Class: Rack::MockResponse::Cookie
- Defined in:
- vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#expires ⇒ Object
readonly
Returns the value of attribute expires.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#secure ⇒ Object
readonly
Returns the value of attribute secure.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(args) ⇒ Cookie
constructor
A new instance of Cookie.
- #method_missing(method_name, *args, &block) ⇒ Object
-
#respond_to_missing?(method_name, include_all = false) ⇒ Boolean
:nocov:.
Constructor Details
#initialize(args) ⇒ Cookie
Returns a new instance of Cookie.
16 17 18 19 20 21 22 23 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 16 def initialize(args) @name = args["name"] @value = args["value"] @path = args["path"] @domain = args["domain"] @expires = args["expires"] @secure = args["secure"] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
25 26 27 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 25 def method_missing(method_name, *args, &block) @value.send(method_name, *args, &block) end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def domain @domain end |
#expires ⇒ Object (readonly)
Returns the value of attribute expires.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def expires @expires end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def path @path end |
#secure ⇒ Object (readonly)
Returns the value of attribute secure.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def secure @secure end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
14 15 16 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 14 def value @value end |
Instance Method Details
#respond_to_missing?(method_name, include_all = false) ⇒ Boolean
:nocov:
32 33 34 |
# File 'vendor/bundler/ruby/3.4.0/bundler/gems/rack-40d68f842b5f/lib/rack/mock_response.rb', line 32 def respond_to_missing?(method_name, include_all = false) @value.respond_to?(method_name, include_all) || super end |