Class: Browserctl::FlowContext
- Inherits:
-
Object
- Object
- Browserctl::FlowContext
- Defined in:
- lib/browserctl/flow.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(page:, params:, client: nil) ⇒ FlowContext
constructor
A new instance of FlowContext.
- #method_missing(name, *args) ⇒ Object
- #respond_to_missing?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(page:, params:, client: nil) ⇒ FlowContext
Returns a new instance of FlowContext.
15 16 17 18 19 |
# File 'lib/browserctl/flow.rb', line 15 def initialize(page:, params:, client: nil) @page = page @client = client @params = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
21 22 23 24 25 |
# File 'lib/browserctl/flow.rb', line 21 def method_missing(name, *args) return @params[name] if args.empty? && @params.key?(name) super end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
13 14 15 |
# File 'lib/browserctl/flow.rb', line 13 def client @client end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
13 14 15 |
# File 'lib/browserctl/flow.rb', line 13 def page @page end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
13 14 15 |
# File 'lib/browserctl/flow.rb', line 13 def params @params end |
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
27 28 29 |
# File 'lib/browserctl/flow.rb', line 27 def respond_to_missing?(name, include_private = false) @params.key?(name) || super end |