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.
16 17 18 19 20 |
# File 'lib/browserctl/flow.rb', line 16 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
22 23 24 25 26 |
# File 'lib/browserctl/flow.rb', line 22 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.
14 15 16 |
# File 'lib/browserctl/flow.rb', line 14 def client @client end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
14 15 16 |
# File 'lib/browserctl/flow.rb', line 14 def page @page end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
14 15 16 |
# File 'lib/browserctl/flow.rb', line 14 def params @params end |
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
28 29 30 |
# File 'lib/browserctl/flow.rb', line 28 def respond_to_missing?(name, include_private = false) @params.key?(name) || super end |